CN107025098A - The method and device of rendering text - Google Patents

The method and device of rendering text Download PDF

Info

Publication number
CN107025098A
CN107025098A CN201610065571.2A CN201610065571A CN107025098A CN 107025098 A CN107025098 A CN 107025098A CN 201610065571 A CN201610065571 A CN 201610065571A CN 107025098 A CN107025098 A CN 107025098A
Authority
CN
China
Prior art keywords
character
drawn
canvas
starting point
abscissa
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610065571.2A
Other languages
Chinese (zh)
Inventor
周建涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201610065571.2A priority Critical patent/CN107025098A/en
Publication of CN107025098A publication Critical patent/CN107025098A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The invention discloses a kind of method and device of rendering text, it is related to field of computer technology, is invented the problem of poor for the method effect of the existing rendering text on Canvas of solution.The method of the present invention includes:Before drawing each character on painting canvas Canvas, calculate current remaining width, remaining width is the difference for the character terminal abscissa that Canvas width subtracts previous character, and character terminal abscissa is the character starting point abscissa of previous character and the character duration sum of previous character;Judge whether remaining width is less than the character duration of character to be drawn;If remaining width is not less than the character duration of character to be drawn, character to be drawn is drawn after previous character;If remaining width is less than the character duration of character to be drawn, character to be drawn is drawn in line feed.The present invention is suitably applied in using during Canvas element rendering texts.

Description

The method and device of rendering text
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and device of rendering text.
Background technology
Painting canvas (Canvas) element is (the Hyper Text Markup Language of HTML 5.0 5.0, abbreviation HTML5) application in a new element, it be used on webpage graphing.Canvas The ability that element oneself is not drawn, it is that the API of a drawing is presented into client, makes client The graphical content of desired drafting is plotted on Canvas by end using JavaScript.In addition, by many The method of kind can also will draw character, text, or image etc. is added on Canvas.
It is typically the starting point that drafting is first set when rendering text on the Canvas in a finite width Text, is then disposably plotted on Canvas by coordinate from left to right since starting point coordinate, due to Canvas only supports single file to draw in itself, therefore when the text for needing to draw is long and single-row layout When total length exceedes Canvas width, then appropriate diminution text can be carried out according to Canvas width To adapt to Canvas width.But, when text is long, and when being narrowed down in visual scope When still complete text can not be plotted in Canvas, for beyond the part of Canvas width text This will not then draw on Canvas, but by beyond part omit, and can also occur in Canvas rightmosts are likely to occur the situation for the part for only showing some character.It in summary it can be seen, The method effect of the existing rendering text on Canvas is poor.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes above mentioned problem or at least portion to provide one kind A kind of method and device of the rendering text solved the above problems with dividing.
In order to solve the above technical problems, on the one hand, the invention provides a kind of method of rendering text, This method includes:
Drawn on painting canvas Canvas before each character, calculate current remaining width, it is described surplus Remaining width is the difference for the character terminal abscissa that Canvas width subtracts previous character, the character Terminal abscissa is the character starting point abscissa of the previous character and the character of the previous character Width sum;
Judge whether the remaining width is less than the character duration of character to be drawn;
If the remaining width is not less than the character duration of the character to be drawn, described previous The character to be drawn is drawn after character;
If the remaining width is less than the character duration of the character to be drawn, enters a new line and treated described in drawing Draw character.
On the other hand, present invention also offers a kind of device of rendering text, the device includes:
Computing unit, for drawing each character on painting canvas Canvas before, calculate current surplus Remaining width, the remaining width is the character terminal abscissa that Canvas width subtracts previous character Difference, the character terminal abscissa for the previous character character starting point abscissa with it is described before The character duration sum of one character;
Judging unit, for judging whether the remaining width is less than the character duration of character to be drawn;
First drawing unit, if wide for the character that the remaining width is not less than the character to be drawn Degree, then draw the character to be drawn after the previous character;
Second drawing unit, if being less than the character duration of the character to be drawn for the remaining width, Then the character to be drawn is drawn in line feed.
The method and device of the rendering text provided by above-mentioned technical proposal, the present invention, can draw Drawn on cloth Canvas before each character, the width that Canvas is calculated first subtracts previous character The difference of character terminal abscissa obtain current Canvas remaining width, wherein character terminal is horizontal sits It is designated as the character starting point abscissa of previous character and the character duration sum of previous character;Then sentence Whether disconnected Canvas current residuals width is less than the character duration of character to be drawn, if remaining width is not small In the character duration of character to be drawn, then character to be drawn is drawn after previous character, if remaining Width is less than the character duration of character to be drawn, then newline draws character to be drawn.With it is existing Technology is compared, the present invention can on Canvas by way of drawing character one by one rendering text, and Current Canvas remaining width is calculated before one character of every drafting, then judges that remaining width is The no character duration less than character to be drawn, and painted according to the result of judgement to decide whether to carry out line feed Character to be drawn is made, the branch for realizing text draws, and drafting is no longer influenced by the limit of Canvas width System, even longer text normally and completely can also be plotted in Canvas, shows more preferably Drafting effect.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantage and benefit for Those of ordinary skill in the art will be clear understanding.Accompanying drawing is only used for showing the mesh of preferred embodiment , and it is not considered as limitation of the present invention.And in whole accompanying drawing, with identical with reference to symbol Number represent identical part.In the accompanying drawings:
Fig. 1 shows a kind of method flow diagram of rendering text provided in an embodiment of the present invention;
Fig. 2 shows the method flow diagram of another rendering text provided in an embodiment of the present invention;
Fig. 3 shows a kind of composition frame chart of the device of rendering text provided in an embodiment of the present invention;
Fig. 4 shows the composition frame chart of the device of another rendering text provided in an embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawing The exemplary embodiment of the disclosure is shown, it being understood, however, that may be realized in various forms the disclosure Without that should be limited by embodiments set forth here.Conversely it is able to more there is provided these embodiments Thoroughly understand the disclosure, and can be by the technology for conveying to this area of the scope of the present disclosure completely Personnel.
The problem of poor for the method effect of the existing rendering text on Canvas of solution, the present invention is implemented Example provides a kind of method of rendering text, as shown in figure 1, this method includes:
101st, drawn on Canvas before each character, calculate current remaining width.
In actual Canvas application scenarios, in order that convenience, it will usually set one lead to Canvas, general Canvas are mainly regulation and setting to its attribute, including regulation Canvas Width, the starting point coordinate etc. drawn.Therefore text is drawn on general Canvas by JavaScript Before this, it is necessary first to Canvas starting point coordinate, Ran Houcong are obtained from Canvas attribute Canvas starting point coordinate starts the character in rendering text.
In order that each character completely can be plotted in Canvas, therefore in one word of every drafting Firstly the need of the remaining width for calculating current Canvas before symbol.Wherein remaining width is Canvas width The difference of the character terminal abscissa of previous character is subtracted, and character terminal abscissa is previous word The character starting point abscissa of symbol and the character duration sum of previous character.It should be noted that Canvas Width is obtained from Canvas attribute.
102nd, judge whether remaining width is less than the character duration of character to be drawn.
After the current remaining width of Canvas is obtained by calculating, it is possible to judge character to be drawn Canvas whether can be completely plotted to suffer.Particularly by whether judging current residual width Decide whether that character to be drawn can be plotted to by complete less than the character duration of character to be drawn In Canvas.
If the 103, remaining width is not less than the character duration of character to be drawn, after previous character Draw character to be drawn.
For the judgement in step 102, if judged result, which is remaining width, is not less than character to be drawn Character duration, then it represents that character to be drawn can be plotted in Canvas by complete, therefore previous Character to be drawn is drawn after individual character.
If the 104, remaining width is less than the character duration of character to be drawn, character to be drawn is drawn in line feed.
For the judgement in step 102, if judged result is the word that remaining width is less than character to be drawn Accord with width, then it represents that character to be drawn can not be plotted in Canvas by complete, it is therefore desirable to changed Row carries out drawing character to be drawn.
According to character the step of above-mentioned steps 101 to 104 one by one in rendering text, until in text Untill all characters have been drawn.
The method for the rendering text that the present embodiment is provided, can draw each word on painting canvas Canvas Before symbol, the width of calculating Canvas first subtracts the difference of the character terminal abscissa of previous character Current Canvas remaining width is obtained, wherein character terminal abscissa rises for the character of previous character The character duration sum of point abscissa and previous character;Then judging Canvas current residual width is The no character duration less than character to be drawn, if remaining width is not less than the character duration of character to be drawn, Character to be drawn then is drawn after previous character, if remaining width is less than the character of character to be drawn Width, then newline draw character to be drawn.Compared with prior art, the present embodiment can be The upper rendering texts by way of drawing character one by one of Canvas, and counted before one character of every drafting Current Canvas remaining width is calculated, then judges whether remaining width is less than the character of character to be drawn Width, and decide whether that carrying out line feed draws character to be drawn, and realizes text according to the result of judgement This branch draws, and drafting is no longer influenced by the limitation of Canvas width, even longer text It can normally and completely be plotted in Canvas, show and preferably draw effect.
Further, as the refinement and extension to embodiment illustrated in fig. 1, present invention also offers another One embodiment.As shown in Fig. 2 the method for rendering text includes in the embodiment:
201st, character to be drawn is drawn on another Canvas.
Character to be drawn drawn on another Canvas be in order to obtain the character duration of character to be drawn and Character height, because the size only set in itself according to character, such as character are set to No. three black matrixes, Its shared width in Canvas and height can not be accurately calculated.Obtain the word of character to be drawn Symbol width and character height are to judge whether character to be drawn needs to be plotted to necessity of next line below Prepare.
It should be noted that another Canvas is one added in the body nodes of html document New Canvas, the Canvas width and height draw the lower character to be drawn enough.
202nd, by traveling through the data of all pixels point on another Canvas, it is determined that character to be drawn The character height of character duration and character to be drawn.
When having been drawn on another Canvas wait the character drawn, travel through on another Canvas and own The coordinate of the data of pixel, i.e. all pixels point, it is then determined that the character duration of character to be drawn and The character height of character to be drawn.Specifically determination process is:All pixels point is traveled through line by line, and When traveling through all pixels point, by with the color identical pixel for drawing character to be drawn that sets in advance The coordinate of point is extracted;Then by the maximum of abscissa in the coordinate of all pixels extracted It is defined as the character duration of character to be drawn, by ordinate in the coordinate of all pixels extracted Maximum is defined as the height of character to be drawn.
203rd, drawn on Canvas before each character, calculate current remaining width.
Remaining width is the difference for the character terminal abscissa that Canvas width subtracts previous character, word Accord with terminal abscissa for character starting point abscissa and the previous character of previous character character duration it With.Wherein the character duration of character is obtained by the method for step 202, of each character Point abscissa is exactly the terminal abscissa of a upper character, and the starting point abscissa of first character is The acquisition modes of the starting point coordinate of the abscissa of Canvas starting point coordinate, wherein Canvas are walked with Fig. 1 The acquisition modes that Canvas starting point coordinate is obtained in rapid 101 are identicals.
204th, judge whether remaining width is less than the character duration of character to be drawn.
The implementation of this step is identical with the implementation of Fig. 1 steps 102, and here is omitted.
If the 205, remaining width is not less than the character duration of character to be drawn, after previous character Draw character to be drawn.
The implementation of this step is identical with the implementation of Fig. 1 steps 103, and here is omitted.
If the 206, remaining width is less than the character duration of character to be drawn, character to be drawn is drawn in line feed.
Character to be drawn is drawn in line feed to be included:
First, it is determined that drawing the starting point coordinate of character to be drawn after line feed.It is by Canvas in the present embodiment Starting point coordinate abscissa as the starting point coordinate that character to be drawn is drawn after line feed abscissa, i.e., The abscissa of starting point per a line is identical;And the starting point coordinate of character to be drawn is drawn after entering a new line Ordinate is determined according to the character height for all characters drawn in lastrow, particularly will The maximum of the character height for all characters drawn in the ordinate and lastrow of the starting point coordinate of lastrow Value sum as the starting point coordinate that character to be drawn is drawn after line feed ordinate, wherein the first row rise What the ordinate of point coordinates was to determine.
Then, since the starting point coordinate that character to be drawn is drawn after line feed, character to be drawn is drawn.
Further, when intercharacter has character pitch, Fig. 1 steps 101 and Fig. 2 steps 203 In the character terminal abscissa of previous character that is related to horizontal sat for the character starting point of previous character Mark, the character duration of previous character and character pitch three's sum.In the ranks there is line space when every When, the ordinate that the starting point coordinate of character to be drawn is drawn after the line feed in Fig. 2 steps 206 is upper one The maximum of the character height for all characters drawn in the ordinate of capable starting point coordinate, lastrow with And line space three's sum.The abscissa of the starting point coordinate after line feed in other Fig. 2 steps 206 Could be arranged to other value, and the starting point in Canvas per a line abscissa can with different, Can freely it be set according to the actual needs in actual application.
Further, as the realization to method shown in above-mentioned Fig. 1 and Fig. 2, the embodiment of the present invention is another One embodiment additionally provides a kind of device of rendering text, for the side shown in above-mentioned Fig. 1 and Fig. 2 Method is realized.The device embodiment is corresponding with preceding method embodiment, for ease of reading, the present apparatus Embodiment is no longer repeated the detail content in preceding method embodiment one by one, it should be understood that Device in the present embodiment can correspond to the full content realized in preceding method embodiment.Such as Fig. 3 institutes Show, the device includes:Computing unit 31, judging unit 32, the first drawing unit 33 and second are painted Unit 34 processed.
Computing unit 31, for drawing each character on painting canvas Canvas before, calculate current Remaining width, remaining width is the difference for the character terminal abscissa that Canvas width subtracts previous character Value, character terminal abscissa is the character starting point abscissa of previous character and the character of previous character Width sum;
Judging unit 32, for judging whether remaining width is less than the character duration of character to be drawn;
First drawing unit 33, if being not less than the character duration of character to be drawn for remaining width, Character to be drawn is drawn after previous character;
Second drawing unit 34, if being less than the character duration of character to be drawn for remaining width, is changed Row draws character to be drawn.
Further, as shown in figure 4, the second drawing unit 34 includes:
Determining module 341, the starting point coordinate for drawing character to be drawn after determination line feed;
Drafting module 342, for since the starting point coordinate that character to be drawn is drawn after line feed, drafting to be treated Draw character.
Further, determining module 341 is used for:
It regard the abscissa of Canvas starting point coordinate as the starting point coordinate that character to be drawn is drawn after line feed Abscissa, draw after determining line feed according to the character height for all characters drawn in lastrow and wait to paint The ordinate of the starting point coordinate of character processed.
Further, as shown in figure 4, device further comprises:
3rd drawing unit 35, for before current remaining width is calculated, in another Canvas On draw character to be drawn, another Canvas is added in HTML html document One new Canvas;
Determining unit 36, for the data by traveling through all pixels point on another Canvas, it is determined that treating Draw the character duration of character and the character height of character to be drawn.
Further, when intercharacter has character pitch, previous character in computing unit 31 Character terminal abscissa is character starting point abscissa, the character duration of previous character of previous character And character pitch three's sum.
The device for the rendering text that the present embodiment is provided, can draw each word on painting canvas Canvas Before symbol, the width of calculating Canvas first subtracts the difference of the character terminal abscissa of previous character Current Canvas remaining width is obtained, wherein character terminal abscissa rises for the character of previous character The character duration sum of point abscissa and previous character;Then judging Canvas current residual width is The no character duration less than character to be drawn, if remaining width is not less than the character duration of character to be drawn, Character to be drawn then is drawn after previous character, if remaining width is less than the character of character to be drawn Width, then newline draw character to be drawn.Compared with prior art, the present embodiment can be The upper rendering texts by way of drawing character one by one of Canvas, and counted before one character of every drafting Current Canvas remaining width is calculated, then judges whether remaining width is less than the character of character to be drawn Width, and decide whether that carrying out line feed draws character to be drawn, and realizes text according to the result of judgement This branch draws, and drafting is no longer influenced by the limitation of Canvas width, even longer text It can normally and completely be plotted in Canvas, show and preferably draw effect.
The rendering text device includes processor and memory, above-mentioned computing unit 31, judging unit 32nd, the first drawing unit 33 and the second drawing unit 34 etc. are stored in memory as program unit In, corresponding function is realized by the said procedure unit of computing device storage in memory.
Present invention also provides a kind of computer program product, when being performed on data processing equipment, It is adapted for carrying out the program code of initialization there are as below methods step:Each is drawn on painting canvas Canvas Before character, current remaining width is calculated, the remaining width subtracts previous for Canvas width The difference of the character terminal abscissa of character, the character terminal abscissa is the previous character The character duration sum of character starting point abscissa and the previous character;Judging the remaining width is The no character duration less than character to be drawn;If the remaining width is not less than the character to be drawn Character duration, then draw the character to be drawn after the previous character;If described remaining wide Degree is less than the character duration of the character to be drawn, then the character to be drawn is drawn in line feed.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system, Or computer program product.Therefore, the application can be implemented using complete hardware embodiment, complete software The form of embodiment in terms of example or combination software and hardware.Moreover, the application can be used at one Or multiple computer-usable storage mediums for wherein including computer usable program code are (including but not Be limited to magnetic disk storage, CD-ROM, optical memory etc.) on the computer program product implemented Form.
The application is with reference to the method, equipment (system) and computer program according to the embodiment of the present application The flow chart and/or block diagram of product is described.Flowed it should be understood that can be realized by computer program instructions In each flow and/or square frame and flow chart and/or block diagram in journey figure and/or block diagram Flow and/or square frame combination.Can provide these computer program instructions to all-purpose computer, specially With the processor of computer, Embedded Processor or other programmable data processing devices to produce one Machine so that produced by the instruction of computer or the computing device of other programmable data processing devices It is raw to be used to realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple sides The device for the function of being specified in frame.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable datas to handle In the computer-readable memory that equipment works in a specific way so that be stored in this and computer-readable deposit Instruction in reservoir, which is produced, includes the manufacture of command device, and command device realization is in flow chart one The function of being specified in flow or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions can also be loaded into computer or other programmable data processing devices On so that series of operation steps is performed on computer or other programmable devices to produce computer The processing of realization, so that the instruction performed on computer or other programmable devices is provided for realizing Specified in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames The step of function.
In a typical configuration, computing device include one or more processors (CPU), input/ Output interface, network interface and internal memory.
Memory potentially includes the volatile memory in computer-readable medium, random access memory The form such as device (RAM) and/or Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Memory is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be with Realize that information is stored by any method or technique.Information can be computer-readable instruction, data knot Structure, the module of program or other data.The example of the storage medium of computer includes, but are not limited to phase Become internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electricity can Erasable programmable read-only memory (EPROM) (EEPROM), fast flash memory bank or other memory techniques, read-only light Disk read-only storage (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic Cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus or any other non-transmission medium, The information that can be accessed by a computing device available for storage.Defined according to herein, it is computer-readable Medium does not include temporary computer readable media (transitory media), the data-signal and load of such as modulation Ripple.
Embodiments herein is these are only, the application is not limited to.For this area skill For art personnel, the application can have various modifications and variations.It is all spirit herein and principle it Interior made any modification, equivalent substitution and improvements etc., should be included in claims hereof model Within enclosing.

Claims (10)

1. a kind of method of rendering text, it is characterised in that methods described includes:
Drawn on painting canvas Canvas before each character, calculate current remaining width, it is described surplus Remaining width is the difference for the character terminal abscissa that Canvas width subtracts previous character, the character Terminal abscissa is the character starting point abscissa of the previous character and the character of the previous character Width sum;
Judge whether the remaining width is less than the character duration of character to be drawn;
If the remaining width is not less than the character duration of the character to be drawn, described previous The character to be drawn is drawn after character;
If the remaining width is less than the character duration of the character to be drawn, enters a new line and treated described in drawing Draw character.
2. according to the method described in claim 1, it is characterised in that wait to paint described in the line feed drafting Character processed, including:
It is determined that drawing the starting point coordinate of the character to be drawn after line feed;
Since the starting point coordinate that the character to be drawn is drawn after line feed, the character to be drawn is drawn.
3. method according to claim 2, it is characterised in that draw institute after the determination line feed The starting point coordinate of character to be drawn is stated, including:
It regard the abscissa of the starting point coordinate of the Canvas as the character to be drawn of drafting after line feed The abscissa of starting point coordinate, is determined after line feed according to the character height for all characters drawn in lastrow Draw the ordinate of the starting point coordinate of the character to be drawn.
4. method according to claim 3, it is characterised in that calculate current residue described Before width, methods described further comprises:
The character to be drawn is drawn on another Canvas, another Canvas is in hypertext The new Canvas added in markup language html document;
By traveling through the data of all pixels point on another Canvas, it is determined that the character to be drawn Character duration and the character to be drawn character height.
5. according to the method described in claim 1, it is characterised in that when the intercharacter has character During interval, the character terminal abscissa of the previous character is the character starting point of the previous character Abscissa, the character duration of the previous character and the character pitch three sum.
6. a kind of device of rendering text, it is characterised in that described device includes:
Computing unit, for drawing each character on painting canvas Canvas before, calculate current surplus Remaining width, the remaining width is the character terminal abscissa that Canvas width subtracts previous character Difference, the character terminal abscissa for the previous character character starting point abscissa with it is described before The character duration sum of one character;
Judging unit, for judging whether the remaining width is less than the character duration of character to be drawn;
First drawing unit, if wide for the character that the remaining width is not less than the character to be drawn Degree, then draw the character to be drawn after the previous character;
Second drawing unit, if being less than the character duration of the character to be drawn for the remaining width, Then the character to be drawn is drawn in line feed.
7. device according to claim 6, it is characterised in that second drawing unit includes:
Determining module, the starting point coordinate for determining the drafting character to be drawn after line feed;
Drafting module, for since the starting point coordinate that the character to be drawn is drawn after line feed, drawing The character to be drawn.
8. device according to claim 7, it is characterised in that the determining module is used for:
It regard the abscissa of the starting point coordinate of the Canvas as the character to be drawn of drafting after line feed The abscissa of starting point coordinate, is determined after line feed according to the character height for all characters drawn in lastrow Draw the ordinate of the starting point coordinate of the character to be drawn.
9. device according to claim 8, it is characterised in that described device further comprises:
3rd drawing unit, for before the current remaining width of the calculating, in another Canvas Character to be drawn described in upper drafting, another Canvas is in HTML html document The new Canvas of one of middle addition;
Determining unit, for the data by traveling through all pixels point on another Canvas, it is determined that The character height of the character duration of the character to be drawn and the character to be drawn.
10. device according to claim 6, it is characterised in that when the intercharacter has word During symbol interval, before the character terminal abscissa of the previous character in the computing unit is described The character starting point abscissa of one character, the character duration and the intercharacter of the previous character Every three's sum.
CN201610065571.2A 2016-01-29 2016-01-29 The method and device of rendering text Pending CN107025098A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610065571.2A CN107025098A (en) 2016-01-29 2016-01-29 The method and device of rendering text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610065571.2A CN107025098A (en) 2016-01-29 2016-01-29 The method and device of rendering text

Publications (1)

Publication Number Publication Date
CN107025098A true CN107025098A (en) 2017-08-08

Family

ID=59524340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610065571.2A Pending CN107025098A (en) 2016-01-29 2016-01-29 The method and device of rendering text

Country Status (1)

Country Link
CN (1) CN107025098A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391159A (en) * 2017-08-09 2017-11-24 青岛海信电器股份有限公司 The word implementation method and device of a kind of intelligent television UI text boxes
CN111385630A (en) * 2018-12-29 2020-07-07 深圳Tcl数字技术有限公司 Processing method, device and storage medium for closed caption data
CN112380819A (en) * 2020-11-17 2021-02-19 北京字跳网络技术有限公司 Document editing method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625700A (en) * 2009-08-12 2010-01-13 中兴通讯股份有限公司 Method and device for optimizing display network page on terminal
CN103942314A (en) * 2014-04-22 2014-07-23 重庆市科学技术研究院 HTML file image-text integrating display method
CN104391829A (en) * 2013-12-13 2015-03-04 贵阳朗玛信息技术股份有限公司 Method and device for realizing multimedia information and text mixed typesetting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625700A (en) * 2009-08-12 2010-01-13 中兴通讯股份有限公司 Method and device for optimizing display network page on terminal
CN104391829A (en) * 2013-12-13 2015-03-04 贵阳朗玛信息技术股份有限公司 Method and device for realizing multimedia information and text mixed typesetting
CN103942314A (en) * 2014-04-22 2014-07-23 重庆市科学技术研究院 HTML file image-text integrating display method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391159A (en) * 2017-08-09 2017-11-24 青岛海信电器股份有限公司 The word implementation method and device of a kind of intelligent television UI text boxes
CN107391159B (en) * 2017-08-09 2020-10-23 海信视像科技股份有限公司 Method and device for realizing characters of UI text box of smart television
CN111385630A (en) * 2018-12-29 2020-07-07 深圳Tcl数字技术有限公司 Processing method, device and storage medium for closed caption data
CN111385630B (en) * 2018-12-29 2022-07-29 深圳Tcl数字技术有限公司 Processing method, device and storage medium for closed caption data
CN112380819A (en) * 2020-11-17 2021-02-19 北京字跳网络技术有限公司 Document editing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN107092643B (en) Barrage rendering method and device
KR102107887B1 (en) Method and apparatus for generating a composite image
CN109933756A (en) Image based on OCR turns shelves method, apparatus, equipment and readable storage medium storing program for executing
CN110069767A (en) Composition method, electronic equipment and computer storage medium based on e-book
CN105912336A (en) Multi-screen adaptive method for mobile terminal front-end development
CN107025098A (en) The method and device of rendering text
CN105786896A (en) Color rendering method and device of page sidebar
CN104794116A (en) Layout method and device for elements in page
CN106354490A (en) Dynamic layout method for EPG page
CN110674619A (en) Online document editing method, device, equipment and computer storage medium
CN109460540A (en) A kind of table paging display methods and device
CN109324796B (en) Interface layout method and device
CN111260752A (en) Flow chart drawing method, device and equipment and storage medium
CN110120059B (en) Icon generation method and device
CN105512096B (en) A kind of optimization method and device based on font embedded in document
CN106649319A (en) Search result display method and device
CN106610824A (en) Page height self-adaptation method and apparatus
CN109948083B (en) Webpage processing method and device
CN111783007B (en) Display rendering method and device, electronic equipment and storage medium
CN115268904A (en) User interface design file generation method, device, equipment and medium
CN113569531B (en) Content typesetting method and device, computer equipment and storage medium
CN106649317A (en) Method and device for displaying graph
JP5612556B2 (en) Applying a passfill algorithm when laying out text around objects
CN110851883B (en) Equipment fingerprint generation method and device based on picture drawing
CN106569816A (en) Rendering method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170808