CN103425631A - Method and device for acquiring font files of target characters in document files - Google Patents

Method and device for acquiring font files of target characters in document files Download PDF

Info

Publication number
CN103425631A
CN103425631A CN2013103058419A CN201310305841A CN103425631A CN 103425631 A CN103425631 A CN 103425631A CN 2013103058419 A CN2013103058419 A CN 2013103058419A CN 201310305841 A CN201310305841 A CN 201310305841A CN 103425631 A CN103425631 A CN 103425631A
Authority
CN
China
Prior art keywords
font
file
document
target text
files
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
CN2013103058419A
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN2013103058419A priority Critical patent/CN103425631A/en
Publication of CN103425631A publication Critical patent/CN103425631A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and device for acquiring font files of target characters to be presented in document files. The method includes the steps of receiving a first request, for requesting the font files of the target characters in the document files, from user equipment, acquiring document files corresponding to document identification according to the document identification in the first request, extracting font information corresponding to the target characters from the acquired embedded font files in the document files according to location identification in the first request, generating font files of the document type which can be supported by a document display client side of the user equipment according to the extracted font information, and supplying the generated font files to the user equipment. The font files of the font document type which can be supported by the document display client side of the user equipment are generated according to the extracted font information of the target characters from the embedded font files in the document files and used for presenting the target characters, so that the presentation speed of the target characters to be presented is increased.

Description

For obtaining method and the device of font file of document files target text
Technical field
The present invention relates to document files and present technology, relate in particular to a kind of method and device for the font file that obtains the target text that document files is to be presented.
Background technology
At present, the user often uses web browser by the URL(Uniform Resource Locator on webpage clicking, URL(uniform resource locator)) address reading documents file, web browser removes to obtain the document files that is stored in the network equipment by this URL, then according to the file style information of the document file, the document file is played up, the document files after playing up is presented on web browser.Wherein, web browser is played up the word in document files with font file, for the word that is presented on the document files on web browser after making to play up can correctly load, and it is identical to present effect in the document files that the effect that the word of the document file presents on web browser is stored in the above-mentioned network equipment with this word, and web browser need to obtain the font file of the document file.
Prior art provides a kind of method that font file is provided, and the method is that the font file of document files is embedded in document files, when web browser obtains the document files that is stored in the network equipment, can together obtain the font file of document files.But, be embedded in the font information that the font file in document files comprises all character scripts in the document file, increased the file size of the document files of embedded font file, like this, can reduce the document files that web browser obtains this embedded font file, play up the document file and be presented on the speed on web browser.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of method and device for the font file that obtains the target text that document files is to be presented, to solve in prior art the problem of obtaining after document files the Speed Reduction that the document display client at subscriber equipment presents because font file being embedded in document files, causing.
According to an aspect of the present invention, provide a kind of method of obtaining the font file of the target text that document files is to be presented in the network equipment for assisting user equipment, comprising:
Reception is from first request for the font file of asking the document files target text of subscriber equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
Obtain the document files corresponding with document identification according to described document identification;
According to described station location marker, from the embedded font file of obtained document files, extract the corresponding font information of described target text;
Generate the font file of the document display client support font file type of this subscriber equipment according to extracted font information;
Generated font file is offered to subscriber equipment.
According to another aspect of the present invention, also provide a kind of in subscriber equipment the method for the font file that obtains the document files target text, comprising:
Send the first request of the font file for asking the document files target text to the network equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
Reception is from the font file in response to described the first request feedback of the network equipment, and this font file for presenting described target text on described document display client.
According to a further aspect of the invention, also provide a kind of device that obtains the font file of the target text that document files is to be presented in the network equipment for assisting user equipment, having comprised:
First receiving device, for receiving the first request for the font file of asking the document files target text from subscriber equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
The document files deriving means, for obtaining according to document identification and corresponding document files;
The font information extraction element, for according to described station location marker, from the embedded font file of obtained document files, extract the corresponding font information of described target text;
The font file generating apparatus, generate the font file of the font file type that the document display client of this subscriber equipment supports for the font information according to extracted;
The first dispensing device, offer subscriber equipment for the font file by generated.
According to a further aspect of the invention, also provide a kind of in subscriber equipment the device for the font file that obtains the document files target text, comprising:
The second dispensing device, for sending the first request of the font file for asking the document files target text to the network equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
The second receiving trap, for receiving the font file in response to described the first request feedback from the network equipment, this font file for presenting described target text on described document display client.
Compared with prior art, the network equipment in the present invention is according to the acquisition request document files of subscriber equipment, extract the corresponding font information of target text to be presented from the embedded font file of obtained document files, generate the font file of the font file type that the document display client of this subscriber equipment supports according to extracted font information, and this font file is offered to this subscriber equipment for presenting target text, because this font file only comprises the font information of target text to be presented, this font file is convenient to transmission, and accelerated the presentation speed of this target text to be presented.
The accompanying drawing explanation
By reading the detailed description that non-limiting example is done of doing with reference to the following drawings, it is more obvious that other features, objects and advantages of the present invention will become:
Fig. 1 is the scene schematic diagram of the scheme for the font file that obtains document files target text to be presented according to the present invention;
Fig. 2 for obtaining according to an embodiment of the invention the method flow diagram of the target text that document files is to be presented in the network equipment for assisting user equipment;
Fig. 3 for obtaining in accordance with another embodiment of the present invention the method flow diagram of the target text that document files is to be presented in the network equipment for assisting user equipment;
Fig. 4 for according to an embodiment of the invention in subscriber equipment for the method flow diagram of the font file that obtains the target text that document files is to be presented;
Fig. 5 in accordance with another embodiment of the present invention in subscriber equipment for the method flow diagram of the font file that obtains the target text that document files is to be presented;
Fig. 6 for obtaining according to an embodiment of the invention the device schematic diagram of the target text that document files is to be presented in the network equipment for assisting user equipment;
Fig. 7 for obtaining in accordance with another embodiment of the present invention the device schematic diagram of the target text that document files is to be presented in the network equipment for assisting user equipment;
Fig. 8 for according to an embodiment of the invention in subscriber equipment for the device schematic diagram of the font file that obtains the target text that document files is to be presented;
Fig. 9 in accordance with another embodiment of the present invention in subscriber equipment for the device schematic diagram of the font file that obtains the target text that document files is to be presented.
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 1 illustrates the scene schematic diagram according to the scheme for the font file that obtains document files target text to be presented of the present invention, comprising subscriber equipment 1 and the network equipment 2, subscriber equipment 1 carries out alternately via network and the network equipment 2, the user sends the first request to the network equipment 2 by subscriber equipment 1, the network equipment 2 for presenting the font file of target text of document files, and offers subscriber equipment 1 by the font file got based on the first acquisition request.
At this, the network equipment comprise a kind of can be according to the instruction of prior setting or storage, automatically carry out the electronic equipment of numerical evaluation and information processing, its hardware includes but not limited to microprocessor, special IC (ASIC), programmable gate array (FPGA), digital processing unit (DSP), embedded device etc.It includes but not limited to the cloud that computing machine, network host, single network server, a plurality of webserver collection or a plurality of server form the described network equipment; At this, cloud consists of a large amount of computing machines based on cloud computing (Cloud Computing) or the webserver, and wherein, cloud computing is a kind of of Distributed Calculation, the virtual supercomputer be comprised of the loosely-coupled computing machine collection of a group.It includes but not limited to described subscriber equipment anyly can carry out with the user mobile electronic product of man-machine interaction by keyboard, touch pad or voice-operated device, for example smart mobile phone, PDA(palm PC, Personal Digital Assistant).Described network includes but not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN (Local Area Network), VPN network, wireless self-organization network (Ad Hoc network) etc.Those skilled in the art will be understood that other subscriber equipment, the network equipment, network are equally applicable to the present invention, also should be included in protection domain of the present invention, and be contained in this at this with way of reference.
Fig. 2 shows the embodiment of the method for obtaining according to an embodiment of the invention the target text that document files is to be presented in the network equipment for assisting user equipment.
As shown in Figure 2, in step S201, the network equipment receives the first request from subscriber equipment, and this first request is for asking the font file of the target text that document files is to be presented.
The document files that the document display client of the subscriber equipment that wherein, the document file is used for the user will present.
Word in document files in the window that in document files, target text to be presented is document display client to be presented on, for example, the user is by the button on the keyboard of subscriber equipment, the touch-screen that perhaps slides is read the document file, when stopping key or sliding touch-screen, in the document file, the 4th of the 3rd page the walks in the window of document display client of the 30th row subscriber equipment to be presented on, and in the document file, the 4th word that walks to the 30th row of the 3rd page is target text to be presented in the document file.
Particularly, the first request can comprise the document identification of described document files and the station location marker of the position of target text in the document file to be presented.
In step S202, the network equipment obtains with the document and identifies corresponding document files according to the document identification of described document files.
The document identification of the document files comprised in described the first request can be the filename of document files, or the memory address of the document file in the network equipment.The file that the document identification of document files of take is document files example by name, document identification be " document A ", the network equipment removes to obtain according to the document sign the document files that file is called " document A ".
In step S203, the network equipment, according to described station location marker, from the embedded font file of obtained document files, extracts the corresponding font information of described target text.
Particularly, the station location marker of target text the to be presented position in the document file can be by target text to be presented the page number in the document file and being expert at, for example " the 3rd page the 4th walk to the 30th row ", the network equipment can be according to this station location marker, obtain the Unicode(Unicode that the 4th of the 3rd page of the document walks to the 30th style of writing word) value, subsequently,, extract the 4th of the 3rd page of the document and walk to the corresponding font information of the 30th style of writing word from the embedded font file of obtained document files according to this Unicode value.
Wherein, Unicode is a kind of character code used on computers, and it is each character but not the unique binary code of glyph definition.In the embedded font file of the document file, according to the Unicode value of document files Chinese word, can find font information corresponding to this Unicode value.
In step S204, the network equipment is according to extracted font information, generates the font file of the font file type that the document display client of this subscriber equipment supports.
Particularly, the network equipment can directly generate according to extracted font information the font file of the font file type that the document display client of this subscriber equipment supports.For example, when the document display client of subscriber equipment is Chrome browser and Firefox browser, Chrome browser and Firefox browser are supported the font file of TTF form, the network equipment can, according to the font information of extracted target text to be presented, directly generate the font file of the TTF form of Chrome and Firefox support.
In addition, the network equipment also can first generate font intermediate form file according to obtained font information, then this font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.For example, when the document display client of subscriber equipment is the IE browser, the IE browser is not supported the font file of TTF form, can be first according to the font information of extracted target text to be presented, the font intermediate form file of generation such as TTF form, then font intermediate form file is converted to the font file of the EOT form that the IE browser supports.
The network equipment can take multiple implementation font intermediate form file to be converted to the font file of the font file type that the document display client of this subscriber equipment supports.Below provide two examples and set forth the implementation that font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.
Example 1
In described the first request except the station location marker of the document identification that comprises document files and the position of target text in the document file to be presented, all right containing type indication information, the type indication information is used to indicate the font file type that in subscriber equipment, the document display client is supported.Particularly, described type indication information can be the type of document display client, can be also the type of the font file supported of document display client.
When the containing type indication information is gone back in described the first request, and when the type indication information is the type of document display client, the network equipment is according to the type of the document display client in this first request, inquiry is obtained the corresponding font file type of described document display client such as the mapping table about " the document files type that document display client type-document display client is supported " mapping relations prestored or index data base, subsequently described font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.
When the containing type indication information is gone back in described the first request, and the type indication information be the document display client support the font file type time, the network equipment is according to the font file type supported of the indicated document display client of type indication information in this first request, will state the font file of font file type that font intermediate form file converts the document display client support of this subscriber equipment to.
Example 2
In described the first request not during the containing type indication information, the font file of font file type that font intermediate form file is converted to the document display client support of this subscriber equipment can be realized in the following ways:
-described font intermediate form file is converted to the dissimilar font file of the corresponding different document display client of a plurality of difference type.
-a plurality of font files that are the same-code form by described a plurality of dissimilar font file transcodings, for example, a plurality of font files that are the base64 coded format by a plurality of dissimilar font file transcodings.
-a plurality of font files of the same-code form after transcoding are merged into to a CSS(Cascading Style Sheet, CSS (cascading style sheet) is single) file.
Wherein, the base64 coded format is common for one of coded system of transmitting the 8Bit syllabified code, and the base64 coding is used in the longer identification information of transmission under the HTTP environment.In the present embodiment, adopt the base64 coded format a longer unique identifier can be encoded to a more brief character string, so that a plurality of font file can be combined into a CSS file, be convenient to transmission.It will be understood by those skilled in the art that, except the base64 coded format, other also all should be included in this patent protection domain applicable to coded format of the present invention, and be contained in this with way of reference.
In step S205, the network equipment offers subscriber equipment by the font file of the font file type of the document display client support of this generated subscriber equipment.Subscriber equipment presents target text to be presented in the document file with this font file.
Fig. 3 shows the method schematic diagram that obtains according to another embodiment of the present invention the target text that document files is to be presented in the network equipment for assisting user equipment, wherein, step S301-S305 is identical with reference to the step S201-S205 in the described embodiment of accompanying drawing 2 with front, do not do and repeat at this, with way of reference, be contained in this.In addition, the step S306 that also comprises embodiment illustrated in fig. 3.
In step S306, while in the document files obtained, there is no embedded font in step S302, network equipment notifying user equipment is extracted the font information failure.
The network equipment in the present embodiment is according to the acquisition request document files of subscriber equipment, extract the corresponding font information of target text to be presented from the embedded font file of obtained document files, generate the font file of the font file type that the document display client of this subscriber equipment supports according to extracted font information, and this font file is offered to this subscriber equipment for presenting target text, because this font file only comprises the font information of target text to be presented, this font file is convenient to transmission, and accelerated the presentation speed of this target text to be presented.In addition, use the method for the target text that document files is to be presented of obtaining for assisting user equipment of the present embodiment in the network equipment, word in can correctly loading document files at the document display client of subscriber equipment, and the text effects of the word that makes to present on the document display client of subscriber equipment while storing in the network equipment with this word is identical.
Fig. 4 shows according to an embodiment of the invention in subscriber equipment the method schematic diagram of the font file for obtaining the target text that document files is to be presented.
As shown in Figure 4, in step S401, subscriber equipment sends the first request of the font file for asking the target text that document files is to be presented to the network equipment.
Wherein, the document files that the document display client that the document file is this subscriber equipment will present.
Word in document files in the window that in document files, target text to be presented is document display client to be presented on, for example, the user is by the button on the keyboard of subscriber equipment, the touch-screen that perhaps slides is read the document file, when stopping key or sliding touch-screen, in the document file, the 4th of the 3rd page the walks in the window of document display client of the 30th row subscriber equipment to be presented on, and in the document file, the 4th word that walks to the 30th row of the 3rd page is target text to be presented in the document file.
Particularly, the first request can comprise the document identification of described document files and the station location marker of the position of target text in the document file to be presented.
Wherein, subscriber equipment can be when the user uses the document display client of this subscriber equipment to present described document files, directly to the network equipment, send the first request of the font file for asking the target text that document files is to be presented, also can first in the local font file database of subscriber equipment, inquire about font file corresponding to target text that whether remains to be presented in local font file database.
Below the specific implementation of font file corresponding to the target text of inquiring about whether to remain to be presented in local font file database with example explanation subscriber equipment.
Example 3
-subscriber equipment is determined the font name of this target text according to the attribute of document files, inquire about font file corresponding to this font name according to the font name of this target text in the font file database of subscriber equipment this locality subsequently.
If-inquire the font file that this font name is corresponding in the font file database of subscriber equipment this locality, use the font file inquired in the font file database of subscriber equipment this locality to present this target text;
If-do not inquire the font file that this font name is corresponding in the font file database of subscriber equipment this locality, to the network equipment, send the first request of the font file for asking the document files target text.
In step S402, subscriber equipment receives the font file in response to described the first request feedback from the network equipment, and this font file for presenting described target text on the document display client of described subscriber equipment.
In the present embodiment, the font file of the font information that only comprises target text to be presented that subscriber equipment provides with the network equipment presents target text, and this font file is convenient to transmission, and has accelerated the presentation speed of this target text to be presented.And if at local search to the font file corresponding to font name of target text, with local search to font file present target text, further accelerated the presentation speed of target text, and saved Internet resources.
Fig. 5 shows according to another embodiment of the present invention in subscriber equipment the method schematic diagram of the font file for obtaining the target text that document files is to be presented, wherein, step S501-S502 is identical with reference to the step S401-S402 in the described embodiment of accompanying drawing 4 with front, do not do and repeat at this, with way of reference, be contained in this.In addition, step S503 and the S504 of also comprising embodiment illustrated in fig. 5.
In step S503, subscriber equipment receives the notice from the extraction font file failure of the network equipment.
When the document files obtained when the network equipment does not have embedded font, subscriber equipment receives the notice from the extraction font file failure of the network equipment.
In step S504, when subscriber equipment receives the notice from the extraction font file failure of the network equipment, subscriber equipment is according to the characteristic information of target text, in a plurality of preset font files, select for presenting the instead of fonts file of described target text, this instead of fonts file for presenting described target text on the document display client of subscriber equipment.
Particularly, the characteristic information of described target text includes but not limited to: set width, font size etc.
To be set width illustrate subscriber equipment How to choose instead of fonts file as example to the characteristic information of target text of take:
Subscriber equipment, according to the set width of described target text, is selected the instead of fonts file, so that the difference of the set width of the set width in described instead of fonts file and described target text is less than predetermined value in a plurality of preset font files.Subsequently, present target text with this instead of fonts file.
In the present embodiment, when the notice of the extraction font file failure that receives the network equipment, select the instead of fonts file to present target text, can guarantee that target text correctly loads.
Fig. 6 shows a kind of device schematic diagram that obtains the target text that document files is to be presented in the network equipment for assisting user equipment of the present invention.
As shown in Figure 6, the device that should be in the network equipment for assisting user equipment, obtains the target text that document files is to be presented comprises: first receiving device 601, document files deriving means 602, font information extraction element 603, font file generating apparatus 604 and the first dispensing device 605.
Wherein, first receiving device 601, for receiving the first request from subscriber equipment, this first request is for asking the font file of the target text that document files is to be presented.
The document files that the document display client of the subscriber equipment that wherein, the document file is used for the user will present.
Word in document files in the window that in document files, target text to be presented is document display client to be presented on, for example, the user is by the button on the keyboard of subscriber equipment, the touch-screen that perhaps slides is read the document file, when stopping key or sliding touch-screen, in the document file, the 4th of the 3rd page the walks in the window of document display client of the 30th row subscriber equipment to be presented on, and in the document file, the 4th word that walks to the 30th row of the 3rd page is target text to be presented in the document file.
Particularly, the first request can comprise the document identification of described document files and the station location marker of the position of target text in the document file to be presented.
Document files deriving means 602, obtain with the document and identify corresponding document files for the document identification according to described document files.
The document identification of the document files comprised in described the first request can be the filename of document files, or the memory address of the document file in the network equipment.The file that the document identification of document files of take is document files example by name, document identification be " document A ", document files deriving means 602 removes to obtain according to the document sign the document files that file is called " document A ".
Font information extraction element 603, for according to described station location marker, from the embedded font file of obtained document files, extract the corresponding font information of described target text.
Particularly, the station location marker of target text the to be presented position in the document file can be by target text to be presented the page number in the document file and being expert at, for example " the 3rd page the 4th walk to the 30th row ", font information extraction element 603 can be according to this station location marker, obtain the Unicode value that the 4th of the 3rd page of the document walks to the 30th style of writing word, subsequently,, extract the 4th of the 3rd page of the document and walk to the corresponding font information of the 30th style of writing word from the embedded font file of obtained document files according to this Unicode value.
Wherein, Unicode is a kind of character code used on computers, and it is each character but not the unique binary code of glyph definition.In the embedded font file of the document file, according to the Unicode value of document files Chinese word, can find font information corresponding to this Unicode value.
Font file generating apparatus 604, for the font information according to extracted, generate the font file of the font file type that the document display client of this subscriber equipment supports.
Particularly, described font file generating apparatus 604 can directly generate according to extracted font information the font file of the font file type that the document display client of this subscriber equipment supports.For example, when the document display client of subscriber equipment is Chrome browser and Firefox browser, Chrome browser and Firefox browser are supported the font file of TTF form, font file generating apparatus 604 can, according to the font information of extracted target text to be presented, directly generate the font file of the TTF form of Chrome and Firefox support.
In addition, described font file generating apparatus 604 also can first generate font intermediate form file according to obtained font information, then this font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.Described font file generating apparatus 604 comprises:
Font intermediate form file creating apparatus (not shown), generate font intermediate form file for the font information according to obtained;
File type conversion device (not shown), the font file of the font file type of supporting for the document display client that described font intermediate form file is converted to this subscriber equipment.
For example, when the document display client of subscriber equipment is the IE browser, the IE browser is not supported the font file of TTF form, described font intermediate form file creating apparatus can be according to the font information of extracted target text to be presented, the font intermediate form file of generation such as TTF form, described file type conversion device converts font intermediate form file to the font file of the EOT form of IE browser support again.
Described file type conversion device can take multiple implementation font intermediate form file to be converted to the font file of the font file type that the document display client of this subscriber equipment supports.Below provide two examples and set forth the implementation that font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.
Example 4
In described the first request except the station location marker of the document identification that comprises document files and the position of target text in the document file to be presented, all right containing type indication information, the type indication information is used to indicate the font file type that in subscriber equipment, the document display client is supported.Particularly, described type indication information can be the type of document display client, can be also the type of the font file supported of document display client.
When the containing type indication information is gone back in described the first request, and when the type indication information is the type of document display client, described file type conversion device is according to the type of the document display client in this first request, inquiry is inquired about the corresponding font file type of described document display client such as the mapping table about " the document files type that document display client type-document display client is supported " mapping relations prestored or index data base, subsequently described font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.
When the containing type indication information is gone back in described the first request, and when the type indication information is the type of the font file supported of document display client, described file type conversion device is according to the font file type supported of the indicated document display client of type indication information in this first request, will state the font file of font file type that font intermediate form file converts the document display client support of this subscriber equipment to.
Example 5
In described the first request, not during the containing type indication information, described file type conversion device can comprise:
Type conversion module (not shown), for converting described font intermediate form file to the dissimilar font file of the corresponding different document display client of a plurality of difference type.
File transcoding module (not shown), for a plurality of font files that are the same-code form by described a plurality of dissimilar font file transcodings, for example, a plurality of font files that are the base64 coded format by a plurality of dissimilar font file transcodings.
Piece file mergence module (not shown), merge into a CSS(Cascading Style Sheet for a plurality of font files of the same-code form by after transcoding, and CSS (cascading style sheet) is single) file.
Wherein, the base64 coded format is common for one of coded system of transmitting the 8Bit syllabified code, and the base64 coded format is used in the longer identification information of transmission under the HTTP environment.In the present embodiment, adopt the base64 coded format a longer unique identifier can be encoded to a more brief character string, so that a plurality of font file can be combined into a CSS file, be convenient to transmission.It will be understood by those skilled in the art that, except the base64 coded format, other also all should be included in this patent protection domain applicable to coded format of the present invention, and be contained in this with way of reference.
The first dispensing device 605, offer subscriber equipment for the font file of the font file type of the document display client support of this subscriber equipment by generated.Subscriber equipment presents target text to be presented in the document file with this font file.
Fig. 7 shows a kind of another embodiment that obtains the device of the target text that document files is to be presented in the network equipment for assisting user equipment of the present invention, wherein, first receiving device 701, document files deriving means 702, font information extraction element 703, font file generating apparatus 704 and the first dispensing device 705 respectively with front with reference to the first receiving device 601 in the described embodiment of accompanying drawing 6, document files deriving means 602, font information extraction element 603, font file generating apparatus 604 is identical with the first dispensing device 605, do not do and repeat at this, be contained in this with way of reference.In addition, embodiment illustrated in fig. 7ly also comprise:
Notifying device 706, for working as obtained document files while there is no embedded font file, notifying user equipment is extracted the font information failure.
Obtain the acquisition request document files of the device of the target text that document files is to be presented according to subscriber equipment for assisting user equipment in the present embodiment in the network equipment, extract the corresponding font information of target text to be presented from the embedded font file of obtained document files, generate the font file of the font file type that the document display client of this subscriber equipment supports according to extracted font information, and this font file is offered to this subscriber equipment for presenting target text, because this font file only comprises the font information of target text to be presented, this font file is convenient to transmission, and accelerated the presentation speed of this target text to be presented.In addition, that uses the present embodiment obtains the device of the target text that document files is to be presented in the network equipment for assisting user equipment, word in can correctly loading document files at the document display client of subscriber equipment, and the text effects of the word that makes to present on the document display client of subscriber equipment while storing in the network equipment with this word is identical.
Fig. 8 show of the present invention a kind of in subscriber equipment for the device embodiment of the font file that obtains the target text that document files is to be presented.
As shown in Figure 8, should be in subscriber equipment for the device of the font file that obtains the target text that document files is to be presented, comprise: the second dispensing device 801 and the second receiving trap 802.
Wherein, the second dispensing device 801, for sending the first request of the font file for asking the target text that document files is to be presented to the network equipment.
Wherein, the document files that the document display client that the document file is this subscriber equipment will present.
Word in document files in the window that in document files, target text to be presented is document display client to be presented on, for example, the user is by the button on the keyboard of subscriber equipment, the touch-screen that perhaps slides is read the document file, when stopping key or sliding touch-screen, in the document file, the 4th of the 3rd page the walks in the window of document display client of the 30th row subscriber equipment to be presented on, and in the document file, the 4th word that walks to the 30th row of the 3rd page is target text to be presented in the document file.
Particularly, the first request can comprise the document identification of described document files and the station location marker of the position of target text in the document file to be presented.
Wherein, subscriber equipment can be when the user uses the document display client of this subscriber equipment to present described document files, directly by the second dispensing device 801, to the network equipment, sent the first request of the font file for asking the target text that document files is to be presented, also can first in the local font file database of subscriber equipment, inquire about font file corresponding to target text that whether remains to be presented in local font file database.
Below the specific implementation of font file corresponding to the target text of inquiring about whether to remain to be presented in local font file database with example explanation subscriber equipment.
Example 6
Should be in subscriber equipment for the device of the font file that obtains the target text that document files is to be presented, also comprise:
Title is determined device 803, determines the font name of this target text for the attribute according to document files.
Local search device 804, font file corresponding to font file database this font name of inquiry for the font name according to this target text in subscriber equipment this locality.
If inquire the font file that this font name is corresponding in the font file database of subscriber equipment this locality, use the font file inquired in the font file database of subscriber equipment this locality to present this target text;
If do not inquire the font file that this font name is corresponding in the font file database of subscriber equipment this locality, the second dispensing device 81 sends the first request of the font file for asking the document files target text to the network equipment.
The second receiving trap 802, for receiving the font file in response to described the first request feedback from the network equipment, this font file for presenting described target text on the document display client of described subscriber equipment.
In the present embodiment, the font file of the font information that only comprises target text to be presented that subscriber equipment provides with the network equipment presents target text, and this font file is convenient to transmission, and has accelerated the presentation speed of this target text to be presented.And if at local search to the font file corresponding to font name of target text, with local search to font file present target text, further accelerated the presentation speed of target text, and saved Internet resources.
Fig. 9 show of the present invention a kind of in subscriber equipment for another embodiment of the device of the font file that obtains the target text that document files is to be presented, wherein, the second dispensing device 901, the second receiving trap 902, title determine that device 903 and local search device 904 determine that with reference to the second dispensing device 801, the second receiving trap 802, title in the described embodiment of accompanying drawing 8 device 803 is identical with local search device 804 with front, do not do and repeat at this, with way of reference, be contained in this.In addition, embodiment illustrated in fig. 9ly also comprise:
The 3rd receiving trap 905, for receiving the notice from the extraction font file failure of the network equipment.Particularly, when the document files obtained when the network equipment does not have embedded font, subscriber equipment receives the notice from the extraction font file failure of the network equipment.
Font selecting arrangement 906, when receiving the notice from the extraction font file failure of the network equipment when subscriber equipment, characteristic information according to target text, in a plurality of preset font files, select for presenting the instead of fonts file of described target text, this instead of fonts file for presenting described target text on the document display client of subscriber equipment.
Particularly, the characteristic information of described target text includes but not limited to: set width, font size etc.
Font selecting arrangement 906, according to the set width of described target text, is selected the instead of fonts file, so that the difference of the set width of the set width in described instead of fonts file and described target text is less than predetermined value in a plurality of preset font files.
In the present embodiment, when the notice of the extraction font file failure that receives the network equipment, select the instead of fonts file to present target text, can guarantee that target text correctly loads.
Compared with prior art, the network equipment in the present invention is according to the acquisition request document files of subscriber equipment, extract the corresponding font information of target text to be presented from the embedded font file of obtained document files, generate the font file of the font file type that the document display client of this subscriber equipment supports according to extracted font information, and this font file is offered to this subscriber equipment for presenting target text, because this font file only comprises the font information of target text to be presented, this font file is convenient to transmission, and accelerated the presentation speed of this target text to be presented.
It should be noted that the present invention can be implemented in the assembly of software and/or software and hardware, for example, each device of the present invention can adopt special IC (ASIC) or any other similar hardware device to realize.In one embodiment, software program of the present invention can carry out to realize step mentioned above or function by processor.Similarly, software program of the present invention (comprising relevant data structure) can be stored in computer readable recording medium storing program for performing, for example, and RAM storer, magnetic or CD-ROM driver or flexible plastic disc and similar devices.In addition, steps more of the present invention or function can adopt hardware to realize, for example, thereby as coordinate the circuit of carrying out each step or function with processor.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned example embodiment, and in the situation that do not deviate from spirit of the present invention or essential characteristic, can realize the present invention with other concrete form.Therefore, no matter from which point, all should regard embodiment as exemplary, and be nonrestrictive, scope of the present invention is limited by claims rather than above-mentioned explanation, therefore is intended to be included in the present invention dropping on the implication that is equal to important document of claim and all changes in scope.Any Reference numeral in claim should be considered as limit related claim.In addition, obviously other unit or step do not got rid of in " comprising " word, and odd number is not got rid of plural number.A plurality of unit of stating in the system claim or device also can be realized by software or hardware by a unit or device.The first, the second word such as grade is used for meaning title, and does not mean any specific order.

Claims (18)

1. a method of obtaining the font file of the target text that document files is to be presented in the network equipment for assisting user equipment, is characterized in that, comprising:
-receive the first request for the font file of asking the document files target text from subscriber equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
-obtain with the document and identify corresponding document files according to described document identification;
-according to described station location marker, from the embedded font file of obtained document files, extract the corresponding font information of described target text;
-generate the font file of the font file type that the document display client of this subscriber equipment supports according to extracted font information;
-generated font file is offered to subscriber equipment.
2. method according to claim 1, is characterized in that, the step of the font file of the font file type of the described document display client support that generates this subscriber equipment according to extracted font information comprises:
-generate font intermediate form file according to obtained font information;
-described font intermediate form file is converted to the font file of the font file type that the document display client of this subscriber equipment supports.
3. method according to claim 1 and 2, is characterized in that, also comprises:
-while in obtained document files, there is no embedded font file, notifying user equipment is extracted the font information failure.
4. method according to claim 2, is characterized in that, in described the first request, also comprises the type indication information, and the type indication information is used to indicate the font file type that in this subscriber equipment, the document display client is supported,
Wherein, the step of the font file of the font file type of the described document display client support that described font intermediate form file is converted to this subscriber equipment comprises:
-indicated document display client is supported according to described type indication information font file type, convert described font intermediate form file to the font file of the font file type that the document display client of this subscriber equipment supports.
5. method according to claim 2, is characterized in that, the step of the font file of the font file type of the described document display client support that described font intermediate form file is converted to this subscriber equipment comprises:
-described font intermediate form file is converted to the dissimilar font file of the corresponding different document display client of a plurality of difference type;
-a plurality of font files that are the same-code form by described a plurality of dissimilar font file transcodings;
-a plurality of font files of the same-code form after transcoding are merged into to a CSS (cascading style sheet) monofile.
One kind in subscriber equipment for the method for the font file that obtains the document files target text, it is characterized in that, comprising:
-send the first request of the font file for asking the document files target text, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file to the network equipment;
-receiving the font file in response to described the first request feedback from the network equipment, this font file for presenting described target text on described document display client.
7. method according to claim 6, is characterized in that, also comprises:
-determine the font name of target text in described document files;
-the font file corresponding at local search according to described font name;
Wherein, the described step that sends the first request of the font file for asking the document files target text to the network equipment comprises:
-when in this locality, not inquiring corresponding font file, send the first request of the font file for asking the document files target text to the network equipment.
8. according to the described method of claim 6 or 7, it is characterized in that, also comprise:
-reception is from the notice of the extraction font file failure of the described network equipment;
-according to the characteristic information of target text, in a plurality of preset font files, to select for presenting the instead of fonts file of described target text, this instead of fonts file for presenting described target text on the document display client.
9. according to the described method of any one in claim 6 to 8, it is characterized in that, the characteristic information of described target text comprises set width, wherein, the described characteristic information according to target text selects the step of the instead of fonts file for presenting described target text to comprise in a plurality of preset font files:
-according to the set width information of described target text, select described instead of fonts file in a plurality of preset font files, so that the difference of the set width of the set width in described instead of fonts file and described target text is less than predetermined value.
10. a device that obtains the font file of the target text that document files is to be presented in the network equipment for assisting user equipment, is characterized in that, comprising:
First receiving device, for receiving the first request for the font file of asking the document files target text from subscriber equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
The document files deriving means, for obtaining according to document identification and corresponding document files;
The font information extraction element, for according to described station location marker, from the embedded font file of obtained document files, extract the corresponding font information of described target text;
The font file generating apparatus, generate the font file of the font file type that the document display client of this subscriber equipment supports for the font information according to extracted;
The first dispensing device, offer subscriber equipment for the font file by generated.
11. device claimed in claim 10, is characterized in that, described font file generating apparatus comprises:
Font intermediate form file creating apparatus, generate font intermediate form file for the font information according to obtained;
The file type conversion device, the font file of the font file type of supporting for the document display client that described font intermediate form file is converted to this subscriber equipment.
12. according to the described device of claim 10 or 11, it is characterized in that, also comprise:
Notifying device, for working as obtained document files while there is no embedded font file, notifying user equipment is extracted the font information failure.
13. method according to claim 11, is characterized in that, in described the first request, also comprises the type indication information, the type indication information is used to indicate the font file type that in this subscriber equipment, the document display client is supported, wherein,
Described file type conversion device is for indicated document display client is supported according to described type indication information font file type, described font intermediate form file converted to the font file of the font file type that the document display client of this subscriber equipment supports.
14. according to the described font processor of right 11, it is characterized in that, described file type conversion device comprises:
The type conversion module, for converting described font intermediate form file to the dissimilar font file of the corresponding different document display client of a plurality of difference type;
File transcoding module, for a plurality of font files that are the same-code form by described a plurality of dissimilar font file transcodings;
The Piece file mergence module, merge into a CSS (cascading style sheet) monofile for a plurality of font files of the same-code form by after transcoding.
15. one kind in subscriber equipment for the device of the font file that obtains the document files target text, it is characterized in that, comprising:
The second dispensing device, for sending the first request of the font file for asking the document files target text to the network equipment, the document identification that described the first request comprises described document files and the station location marker of the position of described target text in the document file;
The second receiving trap, for receiving the font file in response to described the first request feedback from the network equipment, this font file for presenting described target text on described document display client.
16. device according to claim 15 wherein, also comprises:
Title is determined device, for determining the font name of described document files target text;
The local search device, for the font file corresponding at local search according to described font name;
Wherein, described the second dispensing device is used for, and when in this locality, not inquiring corresponding font file, sends the first request of the font file for asking the document files target text to the network equipment.
17. according to the described device of claim 15 or 16, it is characterized in that, also comprise:
The 3rd receiving trap, for receiving the notice from the extraction font file failure of the described network equipment;
The font selecting arrangement for the characteristic information according to target text, is selected for presenting the instead of fonts file of described target text in a plurality of preset font files, and this instead of fonts file for presenting described target text on the document display client.
18. according to claim 15 to the described device of any one in 17, it is characterized in that, the characteristic information of described target text comprises set width, wherein, described font selecting arrangement is for the set width information according to described target text, select described instead of fonts file in a plurality of preset font files, so that the difference of the set width of the set width in described instead of fonts file and described target text is less than predetermined value.
CN2013103058419A 2013-07-19 2013-07-19 Method and device for acquiring font files of target characters in document files Pending CN103425631A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103058419A CN103425631A (en) 2013-07-19 2013-07-19 Method and device for acquiring font files of target characters in document files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103058419A CN103425631A (en) 2013-07-19 2013-07-19 Method and device for acquiring font files of target characters in document files

Publications (1)

Publication Number Publication Date
CN103425631A true CN103425631A (en) 2013-12-04

Family

ID=49650396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103058419A Pending CN103425631A (en) 2013-07-19 2013-07-19 Method and device for acquiring font files of target characters in document files

Country Status (1)

Country Link
CN (1) CN103425631A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484315A (en) * 2014-12-15 2015-04-01 深圳市邦华电子有限公司 Method and system for regulating type font of single module
CN105512096A (en) * 2015-11-30 2016-04-20 北京大学 Optimization method and device based on file embedded font
CN105893335A (en) * 2016-03-30 2016-08-24 广州华多网络科技有限公司 Method and device for displaying text
CN106502968A (en) * 2016-10-12 2017-03-15 北京奇虎科技有限公司 The method and device of data processing
CN107704615A (en) * 2017-10-24 2018-02-16 北京有字库网络科技有限公司 Webpage font display methods and system based on Chinese font subset
CN107943760A (en) * 2017-11-22 2018-04-20 万兴科技股份有限公司 Font optimization method, device, terminal device and the storage medium of PDF document editor
CN109871667A (en) * 2019-02-18 2019-06-11 北京创鑫旅程网络技术有限公司 Data content guard method, device, server and computer-readable medium
CN110362790A (en) * 2019-06-13 2019-10-22 北京三快在线科技有限公司 Processing method, device, electronic equipment and the readable storage medium storing program for executing of font file
CN111476001A (en) * 2019-01-04 2020-07-31 珠海金山办公软件有限公司 Method and device for exporting document, computer storage medium and terminal
WO2021169267A1 (en) * 2020-02-27 2021-09-02 平安科技(深圳)有限公司 Text processing method and apparatus, device, and computer-readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1496180A (en) * 2002-09-14 2004-05-12 ���ǵ�����ʽ���� Method for supporting multilanguage for mobile communication terminal and its communication system
CN101185327A (en) * 2005-05-31 2008-05-21 三星电子株式会社 Method and apparatus for transmitting and receiving partial font file
CN101202748A (en) * 2007-11-27 2008-06-18 优视动景(北京)技术服务有限公司 Method for browsing web of micro browser and micro browser
CN101385011A (en) * 2005-04-22 2009-03-11 微软公司 Methods for providing an accurate visual rendition of a text element formatted with an unavailable font
US20090096795A1 (en) * 2007-10-15 2009-04-16 Mstar Semiconductor, Inc. Method for Processing Font Data in Embedded System
CN102081595A (en) * 2009-11-27 2011-06-01 株式会社Ntt都科摩 Program generation device and program generation method
CN102148852A (en) * 2009-11-19 2011-08-10 奥多比公司 Dynamic streaming of font subsets
CN102222095A (en) * 2011-06-10 2011-10-19 百度在线网络技术(北京)有限公司 Equipment for converting webpage to be displayed and method thereof
CN102326179A (en) * 2009-02-20 2012-01-18 微软公司 Font handling for viewing documents on web
CN102567295A (en) * 2010-12-21 2012-07-11 北大方正集团有限公司 Font processing method and device for embedded device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1496180A (en) * 2002-09-14 2004-05-12 ���ǵ�����ʽ���� Method for supporting multilanguage for mobile communication terminal and its communication system
CN101385011A (en) * 2005-04-22 2009-03-11 微软公司 Methods for providing an accurate visual rendition of a text element formatted with an unavailable font
CN101185327A (en) * 2005-05-31 2008-05-21 三星电子株式会社 Method and apparatus for transmitting and receiving partial font file
US20090096795A1 (en) * 2007-10-15 2009-04-16 Mstar Semiconductor, Inc. Method for Processing Font Data in Embedded System
CN101202748A (en) * 2007-11-27 2008-06-18 优视动景(北京)技术服务有限公司 Method for browsing web of micro browser and micro browser
CN102326179A (en) * 2009-02-20 2012-01-18 微软公司 Font handling for viewing documents on web
CN102148852A (en) * 2009-11-19 2011-08-10 奥多比公司 Dynamic streaming of font subsets
CN102081595A (en) * 2009-11-27 2011-06-01 株式会社Ntt都科摩 Program generation device and program generation method
CN102567295A (en) * 2010-12-21 2012-07-11 北大方正集团有限公司 Font processing method and device for embedded device
CN102222095A (en) * 2011-06-10 2011-10-19 百度在线网络技术(北京)有限公司 Equipment for converting webpage to be displayed and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WEZLY: "《在网页中嵌入任意字体的解决方案》", 30 January 2011 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484315A (en) * 2014-12-15 2015-04-01 深圳市邦华电子有限公司 Method and system for regulating type font of single module
CN105512096B (en) * 2015-11-30 2018-07-06 北京大学 A kind of optimization method and device based on font embedded in document
CN105512096A (en) * 2015-11-30 2016-04-20 北京大学 Optimization method and device based on file embedded font
CN105893335A (en) * 2016-03-30 2016-08-24 广州华多网络科技有限公司 Method and device for displaying text
CN105893335B (en) * 2016-03-30 2019-07-12 广州华多网络科技有限公司 The method and apparatus of display text
CN106502968A (en) * 2016-10-12 2017-03-15 北京奇虎科技有限公司 The method and device of data processing
CN107704615A (en) * 2017-10-24 2018-02-16 北京有字库网络科技有限公司 Webpage font display methods and system based on Chinese font subset
CN107943760A (en) * 2017-11-22 2018-04-20 万兴科技股份有限公司 Font optimization method, device, terminal device and the storage medium of PDF document editor
CN107943760B (en) * 2017-11-22 2021-09-21 万兴科技股份有限公司 Method and device for optimizing fonts of PDF document editing, terminal equipment and storage medium
CN111476001A (en) * 2019-01-04 2020-07-31 珠海金山办公软件有限公司 Method and device for exporting document, computer storage medium and terminal
CN109871667A (en) * 2019-02-18 2019-06-11 北京创鑫旅程网络技术有限公司 Data content guard method, device, server and computer-readable medium
CN110362790A (en) * 2019-06-13 2019-10-22 北京三快在线科技有限公司 Processing method, device, electronic equipment and the readable storage medium storing program for executing of font file
CN110362790B (en) * 2019-06-13 2023-10-27 北京三快在线科技有限公司 Font file processing method and device, electronic equipment and readable storage medium
WO2021169267A1 (en) * 2020-02-27 2021-09-02 平安科技(深圳)有限公司 Text processing method and apparatus, device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN103425631A (en) Method and device for acquiring font files of target characters in document files
CN103207892B (en) Method and device for sharing document through network
CN104112002B (en) A kind of methods, devices and systems of list adaptation
CN102460432B (en) Selective content extraction
CN103699619A (en) Method and device for providing search results
WO2016101754A1 (en) Method and device for web page switching, and device for providing integrated page
CN103605739A (en) Method and device for displaying thermodynamic diagrams
CN102411614A (en) Display Of Image Search Results
CN102375878A (en) Web page browsing system and relay server
US10339204B2 (en) Converting electronic documents having visible objects
CN103546498A (en) Method and equipment for providing access webpage for mobile terminal
JP6140904B2 (en) Terminal marking method, terminal marking device, program, and recording medium
CN103678325A (en) Method and device for providing browsing page corresponding to initial page
CN103268405A (en) Method, device and system for acquiring game information
CN103136259A (en) Method and device for processing webpage contents based on content block identification
CN102760157B (en) A kind of for generating the method that release news, device and the equipment corresponding with mobile terminal
KR20100089339A (en) Method and apparatus for generating and displaying image
EP3111344A1 (en) Information interface generation and/or population
CN104063112A (en) Interaction method, device and system among browsers, and browser
CN104598571A (en) Method and device for playing multimedia resource
CN104123074A (en) Target area estimation apparatus, method and program
CN104156421B (en) The page shows method, apparatus and system
CN103678957A (en) Method, device and equipment for generating picture information and obtaining identity coded information
CN112486337B (en) Handwriting graph analysis method and device and electronic equipment
CN112581568A (en) Dynamic poster generation method, device, server and storage medium

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: 20131204