CN104899227A - Webpage character rendering method and device - Google Patents

Webpage character rendering method and device Download PDF

Info

Publication number
CN104899227A
CN104899227A CN201410083433.8A CN201410083433A CN104899227A CN 104899227 A CN104899227 A CN 104899227A CN 201410083433 A CN201410083433 A CN 201410083433A CN 104899227 A CN104899227 A CN 104899227A
Authority
CN
China
Prior art keywords
word
rendered
webpage
character bitmap
appointment
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
CN201410083433.8A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410083433.8A priority Critical patent/CN104899227A/en
Publication of CN104899227A publication Critical patent/CN104899227A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a webpage character rendering method, which comprises the following steps: setting one or a plurality of assigned characters in advance, independently drawing a corresponding character bitmap for each assigned character to obtain a character bitmap set; when webpage data is received, determining a character to be rendered according to the webpage data; and finding the character bitmap corresponding to the character to be rendered from the character bitmap set, and displaying the character bitmap corresponding to the character to be rendered in a browser page. The invention also provides a webpage character rendering device. The first-character and above-the-fold display speed and sliding smoothness of a webpage can be improved.

Description

A kind of webpage word rendering intent and device
Technical field
The specific embodiment of the invention relates to browser technology field, particularly a kind of webpage word rendering intent and device.
Background technology
Along with the development of computing machine and Internet technology, use various terminal, it is one of application the most common in people's daily life that such as desk-top computer, smart mobile phone, panel computer etc. browse webpage.When terminal passes through the web data that installed browser receives from server, need this web data, comprise word to be rendered, picture even video play up, make it to present to user by browser.
At present, the rendering intent of webpage render engine to the word to be rendered in web data of browser generally includes: the information reading the quantity of word to be rendered, specific font and appointment size from web data, information according to this quantity, specific font and appointment size carries out typesetting to browser page, thus determines the viewing area of word to be rendered; Secondly, from web data, read the coded message of word to be rendered, thus determine word to be rendered; Then, from the character library of browser, find the drawing path of word to be rendered, according to this drawing path and described specific font and specify size to draw character bitmap corresponding to word to be rendered one by one, and this character bitmap is presented in this viewing area successively.
Character bitmap corresponding to a word to be rendered is drawn according to described drawing path, usually the operation steps through line, correction, filling etc. are very many is needed to realize, the speed of therefore drawing character bitmap corresponding to word to be rendered is relatively slow, this will affect after browser receives web data, to display speed and the slip fluency of webpage lead-in head screen, easily cause card, therefore cannot meet some webpages, particularly large-scale webpage is to the high requirement of slip frame per second.
In order to improve display speed and the slip fluency of webpage lead-in head screen, current way can only be the cpu performance promoting terminal, thus improves the drafting speed of character bitmap corresponding to word to be rendered.But, promote cpu performance to need to expend certain cost, and when drawing after the operation of character bitmap takies CPU in a large number, all can have an impact to operations such as the such as loading of other resource in web data, decompress(ion), decoding and typesettings, thus affecting the opening speed of webpage.
Summary of the invention
In view of this, be necessary to provide a kind of webpage word rendering intent and device, display speed and the slip fluency of webpage lead-in head screen can be improved.
A kind of webpage word rendering intent, comprises the following steps: preset one or more appointment word, and respectively to the corresponding character bitmap of each appointment Word-Drawing, obtains character bitmap set; When receiving web data, determine word to be rendered according to this web data; From described character bitmap set, find out character bitmap corresponding to this word to be rendered, character bitmap corresponding for word to be rendered is presented in browser page.
A kind of webpage word rendering device, comprising: presetting module, for presetting one or more appointment word, and respectively to the corresponding character bitmap of each appointment Word-Drawing, obtaining character bitmap set; Determination module, for when receiving web data, determines word to be rendered according to this web data; Searching module, for finding out character bitmap corresponding to this word to be rendered from described character bitmap set, character bitmap corresponding for word to be rendered being presented in browser page.
Compared to prior art, webpage word rendering intent of the present invention and device, by the character bitmap of pre-rendered one or more appointment word, obtain character bitmap set, when receiving web data, directly can find out the character bitmap corresponding with word to be rendered in web data from this article word bit set of graphs to be presented in browser page, thus display speed and the slip fluency of webpage lead-in head screen can be improved.
For above and other object of the present invention, feature and advantage can be become apparent, preferred embodiment cited below particularly, and coordinate institute's accompanying drawings, be described in detail below.
Accompanying drawing explanation
Fig. 1 is a kind of structured flowchart of terminal.
Environment schematic during the webpage word rendering intent application that Fig. 2 provides for the embodiment of the present invention.
The process flow diagram of the webpage word rendering intent that Fig. 3 provides for the embodiment of the present invention.
Fig. 4 presets the method flow diagram of specifying word.
Fig. 5 is the method flow diagram finding out character bitmap corresponding to word to be rendered in Fig. 3 from character bitmap set.
Fig. 6 is for judging the method flow diagram that whether there is the character bitmap corresponding with extracted word to be rendered in character bitmap set in Fig. 5.
The block diagram of the webpage word rendering device that Fig. 7 provides for the embodiment of the present invention.
Embodiment
For further setting forth the present invention for the technological means that realizes predetermined goal of the invention and take and effect, below in conjunction with accompanying drawing and preferred embodiment, to according to the specific embodiment of the present invention, structure, feature and effect thereof, be described in detail as follows.
Fig. 1 shows a kind of structured flowchart of terminal.As shown in Figure 1, terminal 1 comprises one or more (only illustrating one in figure) storer 11, processor 12, memory controller 13, Peripheral Interface 14, communication module 15, input block 16 and display unit 17.These assemblies are by the mutual communication of one or more communication bus/signal wire.
One of ordinary skill in the art will appreciate that, the structure shown in Fig. 1 is only signal, and it does not cause restriction to the structure of terminal 1.Such as, terminal 1 also can comprise than assembly more or less shown in Fig. 1, or has the configuration different from shown in Fig. 1.Each assembly shown in Fig. 1 can adopt hardware, software or its combination to realize.
Storer 11 can be used for storing software program and module, as the webpage word rendering intent in the embodiment of the present invention and programmed instruction/module corresponding to device, processor 12 is by running the software program and module that are stored in storer 11, thus perform the application of various function and data processing, namely realize above-mentioned webpage word rendering intent.
Storer 11 can comprise high speed random access memory, also can comprise nonvolatile memory, as one or more magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, storer 11 can comprise the storer relative to the long-range setting of processor 12 further, and the storer of these long-range settings can be connected to terminal 1 by network.The example of above-mentioned network includes but not limited to internet, intranet, LAN (Local Area Network), mobile radio communication and combination thereof.Processor 12 and other possible assemblies can carry out the access of storer 11 under the control of memory controller 13.
Various input/output device is coupled to processor 12 and storer 11 by Peripheral Interface 14.Various softwares in processor 12 run memory 11, instruction and perform terminal 1 various function and carry out data processing.
Communication module 15 is for communicating with communication network or other equipment.Particularly, communication module 15 can be such as network interface card 151 or RF(Radio Frequency, radio frequency) module 152.Network interface card 151 is as the interface connecting computing machine and transmission medium in LAN (Local Area Network), mate with electric signal for the physical connection realized between local network transport medium, thus set up LAN (Local Area Network) and be connected to the Internet (Internet), with various network as LAN (Local Area Network), Metropolitan Area Network (MAN), wide area network communicate.Network interface card 151 can comprise the various existing circuit component for performing above-mentioned functions, such as processor and storer (comprising ROM and RAM) etc.RF module 152, for receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, thus communicates with communication network or other equipment.RF module 152 can comprise the various existing circuit component for performing these functions, such as, and antenna, radio-frequency (RF) transceiver, digital signal processor, encrypt/decrypt chip, subscriber identity module (SIM) card, storer etc.RF module 152 can with various network as internet, intranet, wireless network carry out communicating or being communicated with other equipment by wireless network.Above-mentioned wireless network can comprise cellular telephone networks, WLAN (wireless local area network) or Metropolitan Area Network (MAN).Above-mentioned wireless network can use various communication standard, agreement and technology, include, but are not limited to global system for mobile communications (Global System for Mobile Communication, GSM), enhancement mode mobile communication technology (Enhanced Data GSM Environment, EDGE), Wideband CDMA Technology (wideband code division multiple access, W-CDMA), CDMA (Code Division Multiple Access) (Code division access, CDMA), tdma (time division multiple access, TDMA), adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (as IEEE-USA standard IEEE 802.11a, IEEE802.11b, IEEE802.11g and/or IEEE802.11n), the networking telephone (Voice over internet protocal, VoIP), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, Wi-Max), other are for mail, the agreement of instant messaging and short message, and any other suitable communication protocol, even can comprise those current agreements be developed not yet.
Input block 16 can be used for the character information receiving input, and produces and to arrange with user and function controls relevant keyboard, mouse, control lever, optics or trace ball signal and inputs.Particularly, input block 16 can comprise button 161 and touch-control surface 162.Button 161 such as can comprise the character keys for input character, and for the control button of trigging control function.The example controlling button comprises " returning main screen " button, start/shutdown button, key etc. of taking pictures.Touch-control surface 162 can collect user or neighbouring touch operation (such as user uses any applicable object or the operations of annex in touch-control surface 162 or near touch-control surface 162 such as finger, stylus) thereon, and according to the corresponding coupling arrangement of the driven by program preset.Optionally, touch-control surface 162 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 12, and the order that energy receiving processor 12 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize touch-control surface 162.Except touch-control surface 162, input block 16 can also comprise other input equipments.Other above-mentioned input equipments include but not limited in physical keyboard, trace ball, mouse, control lever etc. one or more.
Display unit 17 is for showing the various graphic interfaces of the information inputted by user, the information being supplied to user and terminal 1.These graphical user interface can be made up of figure, text, icon, video and its combination in any.In an example, display unit 17 comprises a display panel 171.This display panel 171 such as can be a display panels (Liquid Crystal Display, LCD), Organic Light Emitting Diode (Organic Light-Emitting Diode Display, OLED) display panel, electrophoretic display panel (Electro-Phoretic Display, EPD) etc.Further, touch-control surface 162 can be arranged on display panel 171 thus to form an entirety with display panel 171.
Consult shown in Fig. 2, the environment schematic during webpage word rendering intent application provided for the embodiment of the present invention.In the present embodiment, this webpage word rendering intent is applied in above-mentioned terminal 1, and this terminal 1 carries out network service by network 2 and server 3.The instantiation of this terminal 1 comprise include, but are not limited to desk-top computer, portable computer, smart mobile phone, panel computer, PDA(Personal Digital Assistant, personal digital assistant) or other similar arithmetic units.This server 3 can comprise one or more server, and this server 3 also can be that virtual cloud calculates module certainly.This network 2 can be arbitrary internetwork connection mode, such as internet (Internet), mobile Internet (as 2G, 3G network that telecom operators provide), LAN (Local Area Network) (wired or wireless) etc.
Consult shown in Fig. 3, the embodiment of the present invention provides a kind of webpage word rendering intent, and this webpage word rendering intent comprises the following steps:
Step S1, presets one or more appointment word, and respectively to the corresponding character bitmap of each appointment Word-Drawing, obtains character bitmap set;
Step S2, when receiving web data, determines word to be rendered according to this web data;
Step S3, finds out character bitmap corresponding to this word to be rendered, is presented in browser page by character bitmap corresponding for word to be rendered from described character bitmap set.
According to above-mentioned webpage word rendering intent, by the character bitmap of pre-rendered one or more appointment word, obtain character bitmap set, when receiving web data, directly can find out the character bitmap corresponding with word to be rendered in web data from this article word bit set of graphs to be presented in browser page, thus display speed and the slip fluency of webpage lead-in head screen can be improved.
In some instances, said method each step to realize details as follows:
Preset one or more appointment word described in step S1, in the present embodiment, this appointment word is the word that occurrence frequency is higher in webpage usually.Specifically, consult shown in Fig. 4, the method presetting this one or more appointment word can comprise the following steps:
Step S1.1, obtain collections of web pages, this collections of web pages comprises one or more webpage, and each webpage comprises at least one webpage word;
Step S1.2, adds up the frequency that in this collections of web pages, each webpage word occurs;
Step S1.3, is set as described appointment word according to the frequency that this webpage word occurs by one or more webpage word.
Specifically, each webpage in collections of web pages described in step S1.1 can represent with corresponding web data, this web data comprises various information to be rendered, picture such as to be rendered and the chained address of video, the quantity of word to be rendered, and the coded message of each word to be rendered, information such as appointment size and specific font etc. etc.If the web data of one of them webpage to be played up the browser run to terminal 1, then in the page of this browser, this web data can be presented with visual means, the word etc. such as play the picture of specifying and video, display input frame in corresponding position and specify.
Step S1.2 can obtain the webpage word that each webpage in this collections of web pages comprises, namely the coded message of each webpage word is obtained, and add up according to the coded message of this webpage word the frequency that each webpage word occurs in this collections of web pages, such as webpage word " " occur 509 times, webpage word "Yes" occurs 560 times, and webpage word " no " occurs that 245 is inferior.
One or more webpage word is set as described appointment word by the frequency that step S1.3 occurs according to this webpage word, specifically, step S1.3 can sort to webpage word each in this collections of web pages according to the frequency order from high to low occurred, and the webpage word of the specified quantity come above is set as described appointment word.Thus, the appointment word set by step S1 is the higher webpage word of occurrence frequency in this collections of web pages.
In addition, step S1 also can set described appointment word according to the self-defining operation of user, and such as user can select the conventional word in some webpages as described appointment word by rule of thumb or to the understanding of the web data being about to play up.
Step S1 also to the corresponding character bitmap of each appointment Word-Drawing, will obtain character bitmap set.Certainly, each character bitmap that described character bitmap set comprises also is associated with the coded message of corresponding appointment word.
Specifically, step S1 first can read the drawing path of each appointment word from character library corresponding to the described browser of terminal 1, then according to this drawing path and default font and default size to the corresponding character bitmap of this appointment Word-Drawing.
The character library that described browser is corresponding comprises the drawing path of such as various outer word, middle word and relevant character.This character library can be downloaded when installing described browser and be saved in described storer 11.Described drawing path is for describing the information such as corresponding civilian glyph, lines tendency.Described default font and default size can according to the type set of described browser.Such as the browser of mobile terminal, the font of this acquiescence can be light face type, and the size of acquiescence is medium size, and for the browser of personal computer, the font of this acquiescence can be the Song typeface, and the size of acquiescence is medium size.In the present embodiment, all appointment words will share same default font and default size.Step S1 by operation stepss such as line, correction, fillings, draws out the corresponding character bitmap of appointment word meeting this default font and default size according to this drawing path.Drawn character bitmap, to after the corresponding character bitmap of each appointment Word-Drawing, can also be cached by step S1.
Because usual character bitmap will compare the internal memory accounting for terminal 1, if the appointment word quantity therefore set by step S1 is more, then the character bitmap quantity of drawing also can be more.These character bitmaps are all buffered in the internal memory of terminal 1, the occupancy of terminal 1 internal memory may be made very high, thus affect the treatment effeciency of other application of terminal 1.Therefore, step S1 needs the appointment word setting appropriate quantity according to the memory size of terminal 1 and the running environment of browser.
Web data described in step S2 is from server 3.Namely this web data comprises the page to described browser to be rendered thus presents to the various information of user, picture such as to be rendered and the chained address of video, the quantity of word to be rendered, and the information etc. of the coded message of each word to be rendered, specific font and appointment size.Different specific font can be specified to different words to be rendered and specify size.This web data can comprise HTML(HyperText Markup Language, HTML (Hypertext Markup Language)) data, Javascript script, CSS(Cascading Style Sheet, Cascading Style Sheet) pattern etc.
Step S2 obtains the coded message of word to be rendered from this web data, can determine each word to be rendered according to the coded message of this word to be rendered.After determining each word to be rendered, step S2 can load described character bitmap set from the buffer memory of terminal 1.
In addition, step S2 also will obtain the quantity of word to be rendered, specific font and specify the information of size from this web data, and according to the quantity of this word to be rendered, specific font and specify the information of size to carry out typesetting to described browser page, thus determine the viewing area of word to be rendered.
Specifically, step S2 first can obtain a region to be rendered in browser page, and this region to be rendered is used for playing up described word to be rendered.Then, step S2 and can specify the information of size to determine width information and the elevation information of word to be rendered according to the specific font of this word to be rendered, and be that several highly equal or the stripe region of elevation information slightly larger than word to be rendered by this Region dividing to be rendered according to the quantity of this word to be rendered and elevation information, according to the quantity of this word to be rendered and width information, this stripe region is divided into some row subregions again, thus each row subregion is the viewing area of each word to be rendered.
Consult shown in Fig. 5, step S3 finds out character bitmap corresponding to word to be rendered from described character bitmap set, specifically comprises the following steps:
Step S3.1, extracts word to be rendered one by one, and whenever an extraction word to be rendered, judges whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
Step S3.2, if there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then finds out the character bitmap corresponding with this extracted word to be rendered from this article word bit set of graphs.
Specifically, consult shown in Fig. 6, judge that the method that whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs comprises the following steps:
Step S3.1.1, judge that the coded message of the appointment the word whether coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and judge that whether the specific font of this word to be rendered is consistent with described default font; If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and the specific font of this word to be rendered is consistent with described default font, then perform step S3.1.2; If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with arbitrary character bitmap in this article word bit set of graphs is all inconsistent, or the specific font of this word to be rendered and described default font inconsistent, then perform step S3.1.3;
Step S3.1.2, judges to there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
Step S3.1.3, judges there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs.
In addition, in step S3.2, if there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then step S3.2 needs from character library corresponding to described browser, to find out drawing path corresponding to this extracted word to be rendered further, and according to the specific font of this drawing path and this word to be rendered and character bitmap corresponding to this word to be rendered of specifying the information of size to draw to extract.
Step S3 finds out character bitmap corresponding to this word to be rendered from described character bitmap set, or after drawing out character bitmap corresponding to this extracted word to be rendered by above-mentioned steps S3.2, also need character bitmap corresponding for word to be rendered to be presented in browser page.
Specifically, if step S3 finds out character bitmap corresponding to this word to be rendered from described character bitmap set, then need character bitmap corresponding for this word to be rendered to be adjusted to the appointment size with described word to be rendered, and character bitmap corresponding for the word to be rendered after adjustment is presented in the described viewing area of browser page.If step S3 draws out character bitmap corresponding to this extracted word to be rendered by step S3.2, then direct character bitmap corresponding for drawn word to be rendered to be presented in the described viewing area of browser page.Step S3 can according to from top to bottom, and character bitmap corresponding for each word to be rendered is presented in the described subregion of this viewing area by order from left to right one by one.
In the present embodiment, described step S1 to the corresponding character bitmap of appointment Word-Drawing, does not consider other acquiescence drafting information according to drawing path and default font and default size, such as color, whether be italic etc.If need to consider that this acquiescence draws information, then draw information to the corresponding character bitmap of appointment Word-Drawing according to this drawing path, default font, default size and this acquiescence.
Thus, after obtaining character bitmap set, described step S3.1 judges whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, whether corresponding with a certain character bitmap in this article word bit set of graphs the coded message of the appointment word then needing the coded message of this word to be rendered that judges to extract be consistent, and judge the specific font of this word to be rendered and specify drafting information and described default font and whether give tacit consent to drafting information consistent.The coded message of the appointment word only having the coded message of working as this extracted word to be rendered corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and when the specific font of this word to be rendered is consistent with giving tacit consent to drafting information with appointment drafting information and described default font, just judge to there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs.
In addition, in order to promote GPU(Graphic Processing Unit in terminal 1, graphic process unit) processing speed to browser page, the such as speed of convergent-divergent, the rolling view device page, usual step S3 needs automatically to convert character bitmap corresponding for word to be rendered to texture by system, or adopt the hardware-accelerated operation according to user to convert character bitmap corresponding for word to be rendered to texture, then by this texture display in the described viewing area of browser page.
In sum, the webpage word rendering intent of the present embodiment, by the character bitmap of pre-rendered one or more appointment word, obtain character bitmap set, when receiving the web data from server 3, directly can find out the character bitmap corresponding with word to be rendered in web data from this article word bit set of graphs to be presented in browser page, thus display speed and the slip fluency of webpage lead-in head screen can be improved.
Consult shown in Fig. 7, the embodiment of the present invention also provides a kind of webpage word rendering device 100, and it can be embedded in the browser of terminal 1.This webpage word rendering device 100 comprises presetting module 101, determination module 102 and searches module 103.Be appreciated that above-mentioned each module refers to computer program or program segment, for performing certain one or more specific function.In addition, the differentiation of above-mentioned each module does not represent actual program code and must separate yet.
Presetting module 101, for presetting one or more appointment word, and respectively to the corresponding character bitmap of each appointment Word-Drawing, obtains character bitmap set.
Specifically, presetting module 101 presets the mode of this one or more appointment word can be as follows: obtain collections of web pages, this collections of web pages comprises one or more webpage, and each webpage comprises at least one webpage word; Add up the frequency that in this collections of web pages, each webpage word occurs; According to the frequency that this webpage word occurs, one or more webpage word is set as described appointment word.According to the frequency that this webpage word occurs, one or more webpage word is set as described appointment word, can be such as according to the frequency order from high to low occurred, webpage word each in this collections of web pages is sorted, and the webpage word just coming specified quantity be above set as described appointment word.
Presetting module 101 can read the drawing path of each appointment word from character library corresponding to described browser, and according to this drawing path and default font and default size to the corresponding character bitmap of this appointment Word-Drawing.
Determination module 102, for when receiving the web data from server 3, determines word to be rendered according to this web data.Specifically, determination module 102 can obtain the coded message of word to be rendered from this web data, determines word to be rendered according to the coded message of this word to be rendered.
In addition, determination module 102 also for obtaining the quantity of word to be rendered, specific font and specifying the information of size from this web data, and according to the quantity of this word to be rendered, specific font and specify the information of size to carry out typesetting to described browser page, thus determine the viewing area of word to be rendered.
Searching module 103, for finding out character bitmap corresponding to this word to be rendered from described character bitmap set, character bitmap corresponding for word to be rendered being presented in browser page.
Specifically, search module 103 and can extract word to be rendered one by one, and whenever an extraction word to be rendered, judge whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, if so, then from this article word bit set of graphs, the character bitmap corresponding with this extracted word to be rendered is found out.
Search module 103 and judge that the mode that whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs can be as follows:
Search module 103 and judge that the coded message of the appointment the word whether coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and judge that whether the specific font of this word to be rendered is consistent with described default font;
If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and the specific font of this word to be rendered is consistent with described default font, then searches module 103 and judge to there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with arbitrary character bitmap in this article word bit set of graphs is all inconsistent, or the specific font of this word to be rendered and described default font inconsistent, then search module 103 and judge there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs.
In addition, if search module 103 also for there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then from character library corresponding to described browser, find out drawing path corresponding to this extracted word to be rendered, and according to the specific font of this drawing path and this word to be rendered and character bitmap corresponding to this word to be rendered of specifying size to draw to extract.
Searching module 103 is presented in browser page by character bitmap corresponding for word to be rendered, specifically, search the described appointment size that character bitmap corresponding for word to be rendered can be adjusted to this word to be rendered by module 103, and character bitmap corresponding for the word to be rendered after adjustment is presented in the described viewing area of browser page.Search module 103 and also first can convert character bitmap corresponding to word to be rendered after adjustment to texture, by this texture display in the described viewing area of browser page.
For the specific works process of above each module, the webpage word rendering intent that can provide with further reference to the embodiment of the present invention, does not repeat them here.
In sum, the webpage word rendering device 100 of the present embodiment, by the character bitmap of pre-rendered one or more appointment word, obtain character bitmap set, when receiving the web data from server 3, directly can find out the character bitmap corresponding with word to be rendered in web data from this article word bit set of graphs to be presented in browser page, thus display speed and the slip fluency of webpage lead-in head screen can be improved.
In addition, the embodiment of the present invention also provides a kind of computer-readable recording medium, is stored with computer executable instructions, and above-mentioned computer-readable recording medium is such as nonvolatile memory such as CD, hard disk or flash memory.Above-mentioned computer executable instructions completes various operations in above-mentioned webpage word rendering intent for allowing computing machine or similar arithmetic unit.
The above, it is only preferred embodiment of the present invention, not any pro forma restriction is done to the present invention, although the present invention discloses as above with preferred embodiment, but and be not used to limit the present invention, any those skilled in the art, do not departing within the scope of technical solution of the present invention, make a little change when the technology contents of above-mentioned announcement can be utilized or be modified to the Equivalent embodiments of equivalent variations, in every case be do not depart from technical solution of the present invention content, according to any brief introduction amendment that technical spirit of the present invention is done above embodiment, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (20)

1. a webpage word rendering intent, is characterized in that, the method comprises the following steps:
Preset one or more appointment word, and respectively to the corresponding character bitmap of each appointment Word-Drawing, obtain character bitmap set;
When receiving web data, determine word to be rendered according to this web data;
From described character bitmap set, find out character bitmap corresponding to this word to be rendered, character bitmap corresponding for word to be rendered is presented in browser page.
2. webpage word rendering intent as claimed in claim 1, is characterized in that, described in preset one or more appointment word step comprise:
Obtain collections of web pages, this collections of web pages comprises one or more webpage, and each webpage comprises at least one webpage word;
Add up the frequency that in this collections of web pages, each webpage word occurs;
According to the frequency that this webpage word occurs, one or more webpage word is set as described appointment word.
3. webpage word rendering intent as claimed in claim 2, is characterized in that, one or more webpage word is set as that the step of described appointment word comprises by the described frequency occurred according to this webpage word:
Frequency order from high to low according to occurring sorts to webpage word each in this collections of web pages;
The webpage word of the specified quantity come above is set as described appointment word.
4. webpage word rendering intent as claimed in claim 1, is characterized in that, describedly determines that the step of word to be rendered comprises according to this web data:
The coded message of word to be rendered is obtained from this web data;
Word to be rendered is determined according to the coded message of this word to be rendered.
5. webpage word rendering intent as claimed in claim 1, is characterized in that, describedly comprises the step of the corresponding character bitmap of each appointment Word-Drawing respectively:
The drawing path of each appointment word is read from the character library that described browser is corresponding;
According to this drawing path and default font and default size to the corresponding character bitmap of this appointment Word-Drawing.
6. webpage word rendering intent as claimed in claim 5, is characterized in that, describedly determines that the step of word to be rendered also comprises according to this web data:
The information of the quantity of word to be rendered, specific font and appointment size is obtained from this web data;
According to the quantity of this word to be rendered, specific font and specify the information of size to carry out typesetting to described browser page, thus determine the viewing area of word to be rendered;
Described the step that character bitmap corresponding for word to be rendered is presented in browser page to be comprised:
Character bitmap corresponding for word to be rendered is adjusted to the described appointment size of this word to be rendered, and character bitmap corresponding for the word to be rendered after adjustment is presented in the described viewing area of browser page.
7. webpage word rendering intent as claimed in claim 6, it is characterized in that, the described step finding out character bitmap corresponding to this word to be rendered from described character bitmap set comprises:
Extract word to be rendered one by one, and whenever an extraction word to be rendered, judge whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
If there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then from this article word bit set of graphs, find out the character bitmap corresponding with this extracted word to be rendered.
8. webpage word rendering intent as claimed in claim 7, is characterized in that, describedly judges that the step that whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs comprises:
Judge that the coded message of the appointment the word whether coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and judge that whether the specific font of this word to be rendered is consistent with described default font;
If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and the specific font of this word to be rendered is consistent with described default font, then judge to there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with arbitrary character bitmap in this article word bit set of graphs is all inconsistent, or the specific font of this word to be rendered and described default font inconsistent, then judge there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs.
9. webpage word rendering intent as claimed in claim 8, it is characterized in that, the described step finding out character bitmap corresponding to word to be rendered with this from described character bitmap set also comprises:
If there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then from character library corresponding to described browser, find out drawing path corresponding to this extracted word to be rendered, and according to the specific font of this drawing path and this word to be rendered and character bitmap corresponding to this word to be rendered of specifying size to draw to extract.
10. webpage word rendering intent as claimed in claim 1, is characterized in that, describedly the step that character bitmap corresponding for word to be rendered is presented in browser page is comprised:
Convert character bitmap corresponding for word to be rendered to texture, by this texture display in browser page.
11. 1 kinds of webpage word rendering devices, it is characterized in that, this device comprises:
Presetting module, for presetting one or more appointment word, and respectively to the corresponding character bitmap of each appointment Word-Drawing, obtains character bitmap set;
Determination module, for when receiving web data, determines word to be rendered according to this web data;
Searching module, for finding out character bitmap corresponding to this word to be rendered from described character bitmap set, character bitmap corresponding for word to be rendered being presented in browser page.
12. webpage word rendering devices as claimed in claim 11, is characterized in that, described presetting module presets one or more appointment word and comprises:
Obtain collections of web pages, this collections of web pages comprises one or more webpage, and each webpage comprises at least one webpage word;
Add up the frequency that in this collections of web pages, each webpage word occurs;
According to the frequency that this webpage word occurs, one or more webpage word is set as described appointment word.
13. webpage word rendering devices as claimed in claim 12, is characterized in that, one or more webpage word is set as that described appointment word comprises by the described frequency occurred according to this webpage word:
Frequency order from high to low according to occurring sorts to webpage word each in this collections of web pages;
The webpage word of the specified quantity come above is set as described appointment word.
14. webpage word rendering devices as claimed in claim 11, it is characterized in that, according to this web data, described determination module determines that word to be rendered comprises:
The coded message of word to be rendered is obtained from this web data;
Word to be rendered is determined according to the coded message of this word to be rendered.
15. webpage word rendering devices as claimed in claim 11, is characterized in that, described presetting module comprises the corresponding character bitmap of each appointment Word-Drawing respectively:
The drawing path of each appointment word is read from the character library that described browser is corresponding;
According to this drawing path and default font and default size to the corresponding character bitmap of this appointment Word-Drawing.
16. webpage word rendering devices as claimed in claim 15, is characterized in that, described determination module also for:
The information of the quantity of word to be rendered, specific font and appointment size is obtained from this web data;
According to the quantity of this word to be rendered, specific font and specify the information of size to carry out typesetting to described browser page, thus determine the viewing area of word to be rendered;
Describedly character bitmap corresponding for word to be rendered be presented at browser page comprise:
Character bitmap corresponding for word to be rendered is adjusted to the described appointment size of this word to be rendered, and character bitmap corresponding for the word to be rendered after adjustment is presented in the described viewing area of browser page.
17. webpage word rendering devices as claimed in claim 16, is characterized in that, described in search the character bitmap that module finds out this word to be rendered corresponding from described character bitmap set and comprise:
Extract word to be rendered one by one, and whenever an extraction word to be rendered, judge whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
If there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then from this article word bit set of graphs, find out the character bitmap corresponding with this extracted word to be rendered.
18. webpage word rendering devices as claimed in claim 17, is characterized in that, describedly judge that whether there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs comprises:
Judge that the coded message of the appointment the word whether coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and judge that whether the specific font of this word to be rendered is consistent with described default font;
If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with a certain character bitmap in this article word bit set of graphs is consistent, and the specific font of this word to be rendered is consistent with described default font, then judge to there is the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs;
If the coded message of the appointment word that the coded message of this word to be rendered extracted is corresponding with arbitrary character bitmap in this article word bit set of graphs is all inconsistent, or the specific font of this word to be rendered and described default font inconsistent, then judge there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs.
19. webpage word rendering devices as claimed in claim 18, is characterized in that, described in search module also for:
If there is not the character bitmap corresponding with this extracted word to be rendered in this article word bit set of graphs, then from character library corresponding to described browser, find out drawing path corresponding to this extracted word to be rendered, and according to the specific font of this drawing path and this word to be rendered and character bitmap corresponding to this word to be rendered of specifying size to draw to extract.
20. webpage word rendering devices as claimed in claim 11, is characterized in that, describedly character bitmap corresponding for word to be rendered is presented at browser page comprises:
Convert character bitmap corresponding for word to be rendered to texture, by this texture display in browser page.
CN201410083433.8A 2014-03-07 2014-03-07 Webpage character rendering method and device Pending CN104899227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410083433.8A CN104899227A (en) 2014-03-07 2014-03-07 Webpage character rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410083433.8A CN104899227A (en) 2014-03-07 2014-03-07 Webpage character rendering method and device

Publications (1)

Publication Number Publication Date
CN104899227A true CN104899227A (en) 2015-09-09

Family

ID=54031894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410083433.8A Pending CN104899227A (en) 2014-03-07 2014-03-07 Webpage character rendering method and device

Country Status (1)

Country Link
CN (1) CN104899227A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957136A (en) * 2016-04-19 2016-09-21 广州视源电子科技股份有限公司 Method and system for drawing WordArt effect
CN106126140A (en) * 2016-06-16 2016-11-16 北京金山安全软件有限公司 Method and device for rendering characters and electronic equipment
CN106657821A (en) * 2016-12-28 2017-05-10 杭州趣维科技有限公司 Animation subtitle drawing method with changeable effect
CN107369190A (en) * 2017-07-24 2017-11-21 威创软件南京有限公司 A kind of thermodynamic chart based on rubble accelerates rendering intent
CN108009192A (en) * 2017-09-30 2018-05-08 北京车和家信息技术有限公司 Loading method, the apparatus and system of webpage word
CN108205960A (en) * 2016-12-19 2018-06-26 北京四维图新科技股份有限公司 Method and apparatus, electron map manufacturing system and the navigation system that a kind of word renders
CN109145272A (en) * 2018-07-27 2019-01-04 广州视源电子科技股份有限公司 Text rendering and layout method, device, equipment and storage medium
CN109902282A (en) * 2019-02-20 2019-06-18 腾讯音乐娱乐科技(深圳)有限公司 A kind of character typesetting method, device and storage medium
CN111273982A (en) * 2020-01-17 2020-06-12 北京字节跳动网络技术有限公司 Method, device, electronic equipment and medium for confirming default font of operating system
CN112395529A (en) * 2019-08-14 2021-02-23 腾讯科技(深圳)有限公司 Page loading method, device, equipment and storage medium
CN113573125A (en) * 2020-04-29 2021-10-29 深圳Tcl新技术有限公司 Subtitle rendering method and system based on SVG (scalable vector graphics) font library
CN115859910A (en) * 2022-12-20 2023-03-28 北京百度网讯科技有限公司 Text rendering method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6005588A (en) * 1996-11-06 1999-12-21 Apple Computer, Inc. System and method for rapidly displaying text in a graphical user interface
CN101777066A (en) * 2009-12-31 2010-07-14 优视科技有限公司 Web page rendering and browsing system for mobile communication equipment terminals and application method thereof
CN101833542A (en) * 2010-04-21 2010-09-15 中兴通讯股份有限公司 Method and device for rendering fonts of user interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6005588A (en) * 1996-11-06 1999-12-21 Apple Computer, Inc. System and method for rapidly displaying text in a graphical user interface
CN101777066A (en) * 2009-12-31 2010-07-14 优视科技有限公司 Web page rendering and browsing system for mobile communication equipment terminals and application method thereof
CN101833542A (en) * 2010-04-21 2010-09-15 中兴通讯股份有限公司 Method and device for rendering fonts of user interface

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957136A (en) * 2016-04-19 2016-09-21 广州视源电子科技股份有限公司 Method and system for drawing WordArt effect
CN105957136B (en) * 2016-04-19 2019-05-07 广州视源电子科技股份有限公司 Characters in a fancy style effect method for drafting and its system
CN106126140A (en) * 2016-06-16 2016-11-16 北京金山安全软件有限公司 Method and device for rendering characters and electronic equipment
CN106126140B (en) * 2016-06-16 2019-07-23 珠海豹趣科技有限公司 A kind of method, apparatus and electronic equipment of rendering type
CN108205960A (en) * 2016-12-19 2018-06-26 北京四维图新科技股份有限公司 Method and apparatus, electron map manufacturing system and the navigation system that a kind of word renders
CN106657821B (en) * 2016-12-28 2020-04-28 杭州趣维科技有限公司 Animation subtitle drawing method with changeable effect
CN106657821A (en) * 2016-12-28 2017-05-10 杭州趣维科技有限公司 Animation subtitle drawing method with changeable effect
CN107369190B (en) * 2017-07-24 2020-12-29 威创软件南京有限公司 Rubble-based thermodynamic diagram accelerated rendering method
CN107369190A (en) * 2017-07-24 2017-11-21 威创软件南京有限公司 A kind of thermodynamic chart based on rubble accelerates rendering intent
CN108009192A (en) * 2017-09-30 2018-05-08 北京车和家信息技术有限公司 Loading method, the apparatus and system of webpage word
CN109145272A (en) * 2018-07-27 2019-01-04 广州视源电子科技股份有限公司 Text rendering and layout method, device, equipment and storage medium
CN109145272B (en) * 2018-07-27 2022-09-16 广州视源电子科技股份有限公司 Text rendering and layout method, device, equipment and storage medium
CN109902282A (en) * 2019-02-20 2019-06-18 腾讯音乐娱乐科技(深圳)有限公司 A kind of character typesetting method, device and storage medium
CN109902282B (en) * 2019-02-20 2023-05-09 腾讯音乐娱乐科技(深圳)有限公司 Text typesetting method, text typesetting device and storage medium
CN112395529A (en) * 2019-08-14 2021-02-23 腾讯科技(深圳)有限公司 Page loading method, device, equipment and storage medium
CN112395529B (en) * 2019-08-14 2023-08-11 腾讯科技(深圳)有限公司 Page loading method, device, equipment and storage medium
CN111273982A (en) * 2020-01-17 2020-06-12 北京字节跳动网络技术有限公司 Method, device, electronic equipment and medium for confirming default font of operating system
CN113573125A (en) * 2020-04-29 2021-10-29 深圳Tcl新技术有限公司 Subtitle rendering method and system based on SVG (scalable vector graphics) font library
CN113573125B (en) * 2020-04-29 2023-07-25 深圳Tcl新技术有限公司 Subtitle rendering method and system based on SVG word stock
CN115859910A (en) * 2022-12-20 2023-03-28 北京百度网讯科技有限公司 Text rendering method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104899227A (en) Webpage character rendering method and device
RU2616536C2 (en) Method, device and terminal device to display messages
US20090002324A1 (en) Method, Apparatus and Computer Program Product for Providing a Scrolling Mechanism for Touch Screen Devices
CN108322807B (en) Bullet screen display method and device
CN108205398B (en) Method and device for adapting webpage animation to screen
CN105404458B (en) Webpage content updating method and device
CN105165069A (en) Method for accessing Wi-Fi hotspot device, Wi-Fi hotspot device, and user equipment
US20170286392A1 (en) Method and electronic device for displaying a web page
US20110142344A1 (en) Browsing system, server, and text extracting method
CN105302811A (en) Browser page skipping method and apparatus
CN104348707A (en) Method, device and system for searching conversation message
EP2887203B1 (en) Method, apparatus and terminal device for adaption of page
CN112130729B (en) Page processing method and device, computer equipment and storage medium
WO2013178093A1 (en) Typesetting method, device and system
CN110750664A (en) Picture display method and device
US9754391B2 (en) Webpage display method and apparatus
CN104836778A (en) Method, device and system for realizing identifying code
US20130227444A1 (en) Method and Device for Improving Page Rendering Speed of Browser
CN106575303B (en) Method and device for displaying webpage
CN106789555A (en) Method of transmitting video data and device
CN103823851A (en) Webpage display method and webpage display device
CN104298668A (en) Electronic book acquisition method and device
CN105022734A (en) Background color setting method and background color setting device
US9489128B1 (en) Soft keyboard with size changeable keys for a smart phone
CN105022756A (en) Web page display method and web page display device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150909