CN105677646B - Character library generation method, character library generate system and server - Google Patents

Character library generation method, character library generate system and server Download PDF

Info

Publication number
CN105677646B
CN105677646B CN201410654465.9A CN201410654465A CN105677646B CN 105677646 B CN105677646 B CN 105677646B CN 201410654465 A CN201410654465 A CN 201410654465A CN 105677646 B CN105677646 B CN 105677646B
Authority
CN
China
Prior art keywords
character library
font
webpage
library
data
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.)
Expired - Fee Related
Application number
CN201410654465.9A
Other languages
Chinese (zh)
Other versions
CN105677646A (en
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.)
New Founder Holdings Development Co ltd
Peking University
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University, Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CN201410654465.9A priority Critical patent/CN105677646B/en
Publication of CN105677646A publication Critical patent/CN105677646A/en
Application granted granted Critical
Publication of CN105677646B publication Critical patent/CN105677646B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention proposes a kind of character library generation method, a kind of character libraries to generate system and a kind of server, and character library generation method therein includes: according to the setting command or preset font info file received, and setting character library generates request data;Request data is generated according to the character library, determines original character library, and extract target character library in the original character library.According to the technical solution of the present invention, request data can be generated according to the character library of user setting, the operation such as it is cut out or extracts to corresponding original character library, the character library of low capacity after being simplified, eliminate the redundancy text largely taken less than, to optimize webpage loading velocity, the usage experience of user is improved.

Description

Character library generation method, character library generate system and server
Technical field
The present invention relates to embedded font technical fields, generate in particular to a kind of character library generation method, a kind of character library System and a kind of server.
Background technique
The internet web page of early stage is only capable of using the character library locally defaulted as display character library, such as the local Song typeface, micro- The character library of the soft refined fonts such as black.And with the development of W3C (World Wide Web Consortium) network standard, there is@font-face, i.e. Web Embedded font technology, it is a kind of mode for connecting the font on server, is the CSS3 (Cascading in the W3C network standard Style Sheet, cascading style sheets) in a module, be mainly used for customized Web font to be embedded into webpage.Example Such as, browser can be instructed according to font-face the locally downloading caching of corresponding font file, to use the font of downloading File removes modification text, and therefore, local terminal can use it to read webpage without installing this kind of font.
Web embedded font technology is suitable for the english font in lesser font, such as west font, full library English character library Only 100K or so, low capacity will not influence network speed to the size of file, therefore be very suitable to propagate in embedded web page.
But with the extensive use of the Web embedded font technology in CSS3, the drawbacks of Chinese word library, is just highlighted Although full library Chinese word library can also be completely embedded into webpage, since the number of words of each Chinese word library is huge, capacity one As all in several Mbytes of sizes, loading Chinese word library in webpage will make the loading velocity of webpage substantially reduce, to make The experience for carrying out the user of web page browsing is substantially reduced.
Therefore a kind of new technical solution is needed, the character library of low capacity can be generated according to the needs of users, removal is a large amount of The redundancy text taken less than, to optimize webpage loading velocity.
Summary of the invention
The present invention is based on the above problems, proposes a kind of new technical solution, can generate according to the needs of users The character library of low capacity removes the redundancy text largely taken less than, to optimize webpage loading velocity.
In view of this, the invention proposes a kind of character library generation methods, comprising: according to the setting command received or preset Font info file, setting character library generate request data;Request data is generated according to the character library, determines original character library, and Target character library is extracted in the original character library.
In the technical scheme, user can carry out online font setting according to demands of individuals, and setting option includes fontname With webpage domain name, and the font info file of the user-specific is generated according to the fontname of setting and webpage domain name, these are default Font info file be generally JS (JavaScirpt, literal translate formula scripting language) file.In addition, working as the fontname of user setting When updating with webpage domain name, font info file also updates therewith.When user needs to obtain the character library simplified, Ke Yizhi It connects the character libraries such as name and webpage domain name that set font and generates request data, preset font information text can also be read in systems Part directly acquires the contents such as the fontname being arranged and webpage domain name, and generates request data according to the character library of setting, to correspondence Original character library the operation such as be cut out or extract, to obtain target data, obtained target data adapts to user's needs Simplify after character library.By the technical solution, the character library of low capacity can be generated according to the needs of users, removed largely with not The redundancy text arrived promotes the usage experience of user to optimize webpage loading velocity.
In the above-mentioned technical solutions, it is preferable that the setting command or preset font info file that the basis receives, Character library is set and generates request data, is specifically included: according to the setting command received, for the ID for issuing the setting command Webpage domain name, fontname and text data are set, and duplicate removal is carried out to the text data, or believe according to the preset font File is ceased, the webpage domain name, the fontname and the text data of the webpage are obtained when accessing webpage, and to institute It states text data and carries out duplicate removal;And according to the text data after the webpage domain name, the fontname and duplicate removal, according to Predetermined encryption rule generates encrypted characters string, and the type of the browser according to the webpage, determines the required target word The type in library.
In the technical scheme, when user needs to obtain the character library simplified, can directly set font name, webpage domain name And text data, preset font info file can also be read in systems, directly acquire the fontname being arranged, webpage domain Name and text data.After obtaining fontname, webpage domain name and text data, deduplication operation further is carried out to text data, To delete repeated data therein.
It in the technical scheme, can be with according to the text data after User ID, fontname, webpage domain name and duplicate removal Encrypted characters string is generated, for example, when the entitled quiet flower bud of Founder of the font needed for user foundertest is simplified, according to the font English name FZJLJW and webpage in the font duplicate removal after content of text " university, BeiJing, China ", encrypted characters can be generated String 6ab591e473ce55fd05b0732b5aab6821.
In addition, in the technical scheme, required target character library can also be determined according to the type of the browser of webpage Type, wherein the type of target character library includes TTF (True Type Font), EOT, WOFF (Web Open Font Format, the open font format of webpage), SVG (Scalable Vector Graphics, scalable vector graphics) etc., for example, When the webpage of unlatching is the webpage of IE browser, it can determine that the type of target character library is EOT.
In the above-mentioned technical solutions, it is preferable that the character library generate request data include the ID, it is domain name, described The type of fontname, the encrypted characters string and the required target character library.
In the above-mentioned technical solutions, before preferably extracting the target character library in the original character library, further includes: According to the preset font info file, determine that the character library generates whether request data meets predetermined verification rule;When true When the fixed character library generation request data meets the predetermined verification rule, permission extracts the target in the original character library Character library.
In the technical scheme, it before extracting target character library, needs to verify the permission for extracting target character library, than Such as, judge that the ID of user whether there is in system, if the ID is not present, stop data processing, be not user generation The character library simplified.For another example, judge whether system is stored with current domain name, if not stored current domain name in system, Stop data processing, does not generate the character library simplified for the user.By the technical program, system is allowed only to be specific user Or simplifying for character library can only be carried out according to specific data, and it can be to avoid illegal request, convenient for putting goods on the market, it can also be to avoid malice Request, protects the safety of data.
In the above-mentioned technical solutions, it is preferable that it is described to extract target character library in the original character library, it specifically includes: GLYPH (tag mark) font of the text data is determined in the original character library;Extract the institute of the text data It states GLYPH font or deletes the GLYPH font other than the text data, to generate the target character library.
In the technical scheme, the GLYPH font in original character library can be cut out or is extracted, to generate capacity more The small target character library more simplified, so that the redundancy text that removal largely takes less than promotes user to optimize webpage loading velocity Usage experience.
In the above-mentioned technical solutions, it is preferable that further include: it is pressed according to the target character library of the type to generation Contracting, to obtain the target character library of the required type.
In the technical scheme, target character library can be compressed into TTF (True Type Font), EOT, WOFF, SVG etc. Type, by taking EOT type as an example, after the character library of the EOT type needed for generating the compression of target character library, the text of compressed character library Part storage organization and name are identical as former target character library, and only file format is different.It, can be with by being compressed to target character library The target character library for obtaining multiple format, to widen the scope of application of the character library after simplifying.
In the above-mentioned technical solutions, it is preferable that further include: store the font info file, the encrypted characters string and The target character library, for calling when the encrypted characters string generated again is identical as the encrypted characters string of storage The target character library corresponding with the encrypted characters string of storage, and by the content of the target character library with the shape of CSS code The webpage is written in formula.
In the technical scheme, font info file, encrypted characters string and target character library etc. are stored, when again into When row character library is simplified, if the encrypted characters string generated is identical as the encrypted characters string of storage, the correspondence of storage is called directly The target character library of type, the generation work without carrying out target character library again optimize the speed of webpage load, greatly It is big that the user experience is improved.
Another aspect of the present invention proposes a kind of character library generation system, comprising: setting unit, according to the setting received Order or preset font info file, setting character library generate request data;Processing unit generates number of request according to the character library According to determining original character library, and extract target character library in the original character library.
In the technical scheme, user can carry out online font setting according to demands of individuals, and setting option includes fontname With webpage domain name, and the font info file of the user-specific is generated according to the fontname of setting and webpage domain name, these are default Font info file be generally JS (JavaScirpt, literal translate formula scripting language) file.In addition, working as the fontname of user setting When updating with webpage domain name, font info file also updates therewith.When user needs to obtain the character library simplified, Ke Yizhi It connects the character libraries such as name and webpage domain name that set font and generates request data, preset font information text can also be read in systems Part directly acquires the contents such as the fontname being arranged and webpage domain name, and generates request data according to the character library of setting, to correspondence Original character library the operation such as be cut out or extract, to obtain target data, obtained target data adapts to user's needs Simplify after character library.By the technical solution, the character library of low capacity can be generated according to the needs of users, removed largely with not The redundancy text arrived promotes the usage experience of user to optimize webpage loading velocity.
In the above-mentioned technical solutions, it is preferable that the setting unit is used for: according to the setting command received, being ID setting webpage domain name, fontname and the text data of the setting command are issued, and duplicate removal is carried out to the text data, or According to the preset font info file, the webpage domain name of the webpage, the fontname are obtained when accessing webpage With the text data, and to the text data carry out duplicate removal;And the setting unit further include: character string determines single Member is generated according to predetermined encryption rule and is encrypted according to the text data after the webpage domain name, the fontname and duplicate removal Character string;Type determining units determine the type of the required target character library according to the type of the browser of the webpage.
In the technical scheme, when user needs to obtain the character library simplified, can directly set font name, webpage domain name And text data, preset font info file can also be read in systems, directly acquire the fontname being arranged, webpage domain Name and text data.After obtaining fontname, webpage domain name and text data, deduplication operation further is carried out to text data, To delete repeated data therein.
It in the technical scheme, can be with according to the text data after User ID, fontname, webpage domain name and duplicate removal Encrypted characters string is generated, for example, when the entitled quiet flower bud of Founder of the font needed for user foundertest is simplified, according to the font English name FZJLJW and webpage in the font duplicate removal after content of text " university, BeiJing, China ", encrypted characters can be generated String 6ab591e473ce55fd05b0732b5aab6821.
In addition, in the technical scheme, required target character library can also be determined according to the type of the browser of webpage Type, wherein the type of target character library includes TTF (True Type Font), EOT, WOFF, SVG etc., for example, when unlatching When webpage is the webpage of IE browser, it can determine that the type of target character library is EOT.
In the above-mentioned technical solutions, it is preferable that the character library generate request data include the ID, it is domain name, described The type of fontname, the encrypted characters string and the required target character library;And the character library generates system further include: really Order member, it is described extract target character library in original character library before, according to the preset font info file, determine institute It states character library and generates request data and whether meet predetermined verification rule, and when determining that the character library generates described in request data meets When predetermined verification rule, the target character library is extracted in permission in the original character library.
In the technical scheme, it before extracting target character library, needs to verify the permission for extracting target character library, than Such as, judge that the ID of user whether there is in system, if the ID is not present, stop data processing, be not user generation The character library simplified.For another example, judge whether system is stored with current domain name, if not stored current domain name in system, Stop data processing, does not generate the character library simplified for the user.By the technical program, system is allowed only to be specific user Or simplifying for character library can only be carried out according to specific data, and it can be to avoid illegal request, convenient for putting goods on the market, it can also be to avoid malice Request, protects the safety of data.
In the above-mentioned technical solutions, it is preferable that the processing unit is used for: the text is determined in the original character library The GLYPH font of data, and extract the GLYPH font of the text data or delete the institute other than the text data GLYPH font is stated, to generate the target character library.
In the technical scheme, the GLYPH font in original character library can be cut out or is extracted, to generate capacity more The small target character library more simplified, so that the redundancy text that removal largely takes less than promotes user to optimize webpage loading velocity Usage experience.
In the above-mentioned technical solutions, it is preferable that further include: compression unit, according to the type to the target of generation Character library is compressed, to obtain the target character library of the required type.
In the technical scheme, target character library can be compressed into TTF (True Type Font), EOT, WOFF, SVG etc. Type, by taking EOT type as an example, after the character library of the EOT type needed for generating the compression of target character library, the text of compressed character library Part storage organization and name are identical as former target character library, and only file format is different.It, can be with by being compressed to target character library The target character library for obtaining multiple format, to widen the scope of application of the character library after simplifying.
In the above-mentioned technical solutions, it is preferable that further include: storage unit stores the font info file, the encryption Character string and the target character library, so that the encrypted characters string that ought be generated again is identical as the encrypted characters string of storage When, the target character library corresponding with the encrypted characters string of storage is called, and by the content of the target character library with CSS generation The webpage is written in the form of code.
In the technical scheme, font info file, encrypted characters string and target character library etc. are stored, when again into When row character library is simplified, if the encrypted characters string generated is identical as the encrypted characters string of storage, the correspondence of storage is called directly The target character library of type, the generation work without carrying out target character library again optimize the speed of webpage load, greatly It is big that the user experience is improved.
Another aspect of the invention proposes a kind of server, includes that character library as described in the above technical scheme generates system System.Therefore, the character library which there is above-mentioned technical proposal to provide generates whole beneficial effects of system, no longer superfluous herein It states.
By above technical scheme, request data can be generated according to the character library of user setting, to corresponding original character library The operation such as it is cut out or extracts, the character library of the low capacity after being simplified eliminates the redundancy text largely taken less than, thus Webpage loading velocity is optimized, the usage experience of user is improved.
Detailed description of the invention
Fig. 1 shows the flow chart of character library generation method according to an embodiment of the invention;
Fig. 2 shows the block diagrams that character library according to an embodiment of the invention generates system;
Fig. 3 shows the block diagram that character library according to another embodiment of the invention generates system;
Fig. 4 shows the specific flow chart that the processing character library in the character library generation system of Fig. 3 generates request data;
Fig. 5 shows the block diagram of server according to an embodiment of the invention.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying mode, the present invention is further described in detail.It should be noted that in the absence of conflict, the implementation of the application Feature in example and embodiment can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, still, the present invention may be used also To be implemented using other than the one described here other modes, therefore, protection scope of the present invention is not by described below Specific embodiment limitation.
Fig. 1 shows the flow chart of character library generation method according to an embodiment of the invention.
As shown in Figure 1, character library generation method according to an embodiment of the invention, comprising:
Step 102, according to the setting command or preset font info file received, character library is set and generates number of request According to.
Step 104, request data is generated according to character library, determines original character library, and extract target word in original character library Library.
In the technical scheme, user can carry out online font setting according to demands of individuals, and setting option includes fontname With webpage domain name, and the font info file of the user-specific is generated according to the fontname of setting and webpage domain name, these are default Font info file be generally JS (JavaScirpt, literal translate formula scripting language) file.In addition, working as the fontname of user setting When updating with webpage domain name, font info file also updates therewith.When user needs to obtain the character library simplified, Ke Yizhi It connects the character libraries such as name and webpage domain name that set font and generates request data, preset font information text can also be read in systems Part directly acquires the contents such as the fontname being arranged and webpage domain name, and generates request data according to the character library of setting, to correspondence Original character library the operation such as be cut out or extract, to obtain target data, obtained target data adapts to user's needs Simplify after character library.By the technical solution, the character library of low capacity can be generated according to the needs of users, removed largely with not The redundancy text arrived promotes the usage experience of user to optimize webpage loading velocity.
In the above-mentioned technical solutions, it is preferable that step 102 specifically includes: according to the setting command received, being set to issue ID setting webpage domain name, fontname and the text data of order are set, and duplicate removal is carried out to text data, or according to preset font Message file, webpage domain name, fontname and the text data of webpage are obtained when accessing webpage, and are gone to text data Weight;And according to the text data after webpage domain name, fontname and duplicate removal, encrypted characters string is generated according to predetermined encryption rule, And the type of the browser according to webpage, determine the type of required target character library.
In the technical scheme, when user needs to obtain the character library simplified, can directly set font name, webpage domain name And text data, preset font info file can also be read in systems, directly acquire the fontname being arranged, webpage domain Name and text data.After obtaining fontname, webpage domain name and text data, deduplication operation further is carried out to text data, To delete repeated data therein.
It in the technical scheme, can be with according to the text data after User ID, fontname, webpage domain name and duplicate removal Encrypted characters string is generated, for example, when the entitled quiet flower bud of Founder of the font needed for user foundertest is simplified, according to the font English name FZJLJW and webpage in the font duplicate removal after content of text " university, BeiJing, China ", encrypted characters can be generated String 6ab591e473ce55fd05b0732b5aab6821.
In addition, in the technical scheme, required target character library can also be determined according to the type of the browser of webpage Type, wherein the type of target character library includes TTF (True Type Font), EOT, WOFF, SVG etc., for example, when unlatching When webpage is the webpage of IE browser, it can determine that the type of target character library is EOT.
In the above-mentioned technical solutions, it is preferable that it includes ID, domain name, fontname, encrypted characters string that character library, which generates request data, With the type of required target character library.
In the above-mentioned technical solutions, it is preferable that before step 104, further includes: according to preset font info file, Determine that character library generates whether request data meets predetermined verification rule;Make a reservation for verification rule when determining that character library generation request data meets When then, allow to extract target character library in original character library.
In the technical scheme, it before extracting target character library, needs to verify the permission for extracting target character library, than Such as, judge that the ID of user whether there is in system, if the ID is not present, stop data processing, be not user generation The character library simplified.For another example, judge whether system is stored with current domain name, if not stored current domain name in system, Stop data processing, does not generate the character library simplified for the user.By the technical program, system is allowed only to be specific user Or simplifying for character library can only be carried out according to specific data, and it can be to avoid illegal request, convenient for putting goods on the market, it can also be to avoid malice Request, protects the safety of data.
In the above-mentioned technical solutions, it is preferable that step 104 specifically includes: text data is determined in original character library GLYPH font;It extracts the GLYPH font of text data or deletes the GLYPH font other than text data, to generate target word Library.
In the technical scheme, the GLYPH font in original character library can be cut out or is extracted, to generate capacity more The small target character library more simplified, so that the redundancy text that removal largely takes less than promotes user to optimize webpage loading velocity Usage experience.
In the above-mentioned technical solutions, it is preferable that further include: it is compressed according to target character library of the type to generation, to obtain Take the target character library of required type.
In the technical scheme, target character library can be compressed into TTF (True Type Font), EOT, WOFF, SVG etc. Type, by taking EOT type as an example, after the character library of the EOT type needed for generating the compression of target character library, the text of compressed character library Part storage organization and name are identical as former target character library, and only file format is different.It, can be with by being compressed to target character library The target character library for obtaining multiple format, to widen the scope of application of the character library after simplifying.
In the above-mentioned technical solutions, it is preferable that further include: storage font info file, encrypted characters string and target character library, It is corresponding with the encrypted characters string of storage for calling when the encrypted characters string generated again is identical as the encrypted characters string of storage Target character library, and webpage is written into the content of target character library in the form of CSS code.
In the technical scheme, font info file, encrypted characters string and target character library etc. are stored, when again into When row character library is simplified, if the encrypted characters string generated is identical as the encrypted characters string of storage, the correspondence of storage is called directly The target character library of type, the generation work without carrying out target character library again optimize the speed of webpage load, greatly It is big that the user experience is improved.
Fig. 2 shows the block diagrams that character library according to an embodiment of the invention generates system.
As shown in Fig. 2, character library according to an embodiment of the invention generates system 200, comprising: setting unit 202, root According to the setting command or preset font info file received, character library is set and generates request data;Processing unit 204, according to Character library generates request data, determines original character library, and target character library is extracted in original character library.
In the technical scheme, user can carry out online font setting according to demands of individuals, and setting option includes fontname With webpage domain name, and the font info file of the user-specific is generated according to the fontname of setting and webpage domain name, these are default Font info file be generally JS (JavaScirpt, literal translate formula scripting language) file.In addition, working as the fontname of user setting When updating with webpage domain name, font info file also updates therewith.When user needs to obtain the character library simplified, Ke Yizhi It connects the character libraries such as name and webpage domain name that set font and generates request data, preset font information text can also be read in systems Part directly acquires the contents such as the fontname being arranged and webpage domain name, and generates request data according to the character library of setting, to correspondence Original character library the operation such as be cut out or extract, to obtain target data, obtained target data adapts to user's needs Simplify after character library.By the technical solution, the character library of low capacity can be generated according to the needs of users, removed largely with not The redundancy text arrived promotes the usage experience of user to optimize webpage loading velocity.
In the above-mentioned technical solutions, it is preferable that setting unit 202 is used for: according to the setting command received, being set to issue ID setting webpage domain name, fontname and the text data of order are set, and duplicate removal is carried out to text data, or according to preset font Message file, webpage domain name, fontname and the text data of webpage are obtained when accessing webpage, and are gone to text data Weight;And setting unit 202 further include: character string determination unit 2022, according to the text after webpage domain name, fontname and duplicate removal Data generate encrypted characters string according to predetermined encryption rule;Type determining units 2024, according to the type of the browser of webpage, Determine the type of required target character library.
In the technical scheme, when user needs to obtain the character library simplified, can directly set font name, webpage domain name And text data, preset font info file can also be read in systems, directly acquire the fontname being arranged, webpage domain Name and text data.After obtaining fontname, webpage domain name and text data, deduplication operation further is carried out to text data, To delete repeated data therein.
It in the technical scheme, can be with according to the text data after User ID, fontname, webpage domain name and duplicate removal Encrypted characters string is generated, for example, when the entitled quiet flower bud of Founder of the font needed for user foundertest is simplified, according to the font English name FZJLJW and webpage in the font duplicate removal after content of text " university, BeiJing, China ", encrypted characters can be generated String 6ab591e473ce55fd05b0732b5aab6821.
In addition, in the technical scheme, required target character library can also be determined according to the type of the browser of webpage Type, wherein the type of target character library includes TTF (True Type Font), EOT, WOFF, SVG etc., for example, when unlatching When webpage is the webpage of IE browser, it can determine that the type of target character library is EOT.
In the above-mentioned technical solutions, it is preferable that it includes ID, domain name, fontname, encrypted characters string that character library, which generates request data, With the type of required target character library;And character library generates system 200 further include: determination unit 206 is mentioned in original character library Before taking out target character library, according to preset font info file, determine that character library generates whether request data meets predetermined verification Rule, and when determining that character library generation request data meets predetermined verification rule, allow to extract target word in original character library Library.
In the technical scheme, it before extracting target character library, needs to verify the permission for extracting target character library, than Such as, judge that the ID of user whether there is in system, if the ID is not present, stop data processing, be not user generation The character library simplified.For another example, judge whether system is stored with current domain name, if not stored current domain name in system, Stop data processing, does not generate the character library simplified for the user.By the technical program, system is allowed only to be specific user Or simplifying for character library can only be carried out according to specific data, and it can be to avoid illegal request, convenient for putting goods on the market, it can also be to avoid malice Request, protects the safety of data.
In the above-mentioned technical solutions, it is preferable that processing unit 204 is used for: text data is determined in original character library GLYPH font, and extract the GLYPH font of text data or delete the GLYPH font other than text data, to generate target Character library.
In the technical scheme, the GLYPH font in original character library can be cut out or is extracted, to generate capacity more The small target character library more simplified, so that the redundancy text that removal largely takes less than promotes user to optimize webpage loading velocity Usage experience.
In the above-mentioned technical solutions, it is preferable that further include: compression unit 208, according to type to the target character library of generation into Row compression, to obtain the target character library of required type.
In the technical scheme, target character library can be compressed into TTF (True Type Font), EOT, WOFF, SVG etc. Type, by taking EOT type as an example, after the character library of the EOT type needed for generating the compression of target character library, the text of compressed character library Part storage organization and name are identical as former target character library, and only file format is different.It, can be with by being compressed to target character library The target character library for obtaining multiple format, to widen the scope of application of the character library after simplifying.
In the above-mentioned technical solutions, it is preferable that further include: storage unit 210 stores font info file, encrypted characters String and target character library, for when the encrypted characters string generated again is identical as the encrypted characters string of storage, calling and storage The corresponding target character library of encrypted characters string, and webpage is written into the content of target character library in the form of CSS code.
In the technical scheme, font info file, encrypted characters string and target character library etc. are stored, when again into When row character library is simplified, if the encrypted characters string generated is identical as the encrypted characters string of storage, the correspondence of storage is called directly The target character library of type, the generation work without carrying out target character library again optimize the speed of webpage load, greatly It is big that the user experience is improved.
Fig. 3 shows the block diagram that character library according to another embodiment of the invention generates system.
As shown in figure 3, character library according to another embodiment of the invention generates system 300, comprising:
User setting module 302 can carry out online font according to the demands of individuals of user in user setting module 302 Setting, setting option therein include that setting result can be stored in character library and generated by fontname and webpage domain name after setting completed In system 300, and according to the JS file of the data of setting generation user-specific, and JS file is saved to character library and generates system In 300.
Request data obtains module 304, and a complete request data includes User ID, webpage domain name, font English name With the content of text after duplicate removal, there are two types of the modes of acquisition request data: the customized mode of user and the automatic acquisition modes of system.
Request issues module 306, straight as long as getting complete request data when the customized mode of selection user When connecing to server and issue the request, and send whole request datas, and selecting system to obtain automatically to ask mode, if got A plurality of partial data then recycles sending request, and sends whole request datas.
Request processing module 308 comprising: small library submodule is simplified in data check submodule, judging submodule, extraction Block cuts submodule, extracts submodule and compression submodule.In request processing module 308, first by data check submodule Make requests the verification of data, if verification failure, abort request handle and returns failed message, if by verifying into Enter judging submodule;Judging submodule, judges whether the request data has the right to be further processed and which should enter Module is further processed;When the judgment result is yes, it extracts and simplifies small character library module by cutting submodule or extracting submodule TTF character library is simplified to generate, compression submodule will simplify TTF character library and be converted to various online font formats, when judging result is When no, failed message is returned to, and record failed message.
Returned data module 310, finally, character library, which generates system 300, all will write data into the page with CSS code form, So, even if developer does not have knowledge relevant to the@font-face of CSS3, it is possible to use online font.
User data memory module 312, the user data of storage include the JS file of user-specific, user use it is all That simplifies small library and various online font formats simplifies small library.
In the above-mentioned technical solutions, it is preferable that when the fontname of the setting option in user setting module 302 is presented to the user For the Chinese of Chinese word library, and it is derived from the word-base data record that character library generates system 300;The domain name of setting option is to apply The domain name of line font, and include URL (Uniform Resource Locator, uniform resource locator) protocol section, for example, http://www.foundertype.com。
In the above-mentioned technical solutions, it is preferable that all setting data recorded in user setting module 302, fontname It is all one-to-one relationship with domain name, that is to say, that a data is made of User ID, fontname and domain name, this three have It is associated with uniqueness, so stores the subsequent expansion for generating system 300 convenient for character library, wherein the set-up mode of user can flexibly become It is dynamic.
In the above-mentioned technical solutions, it is preferable that produce user-specific according to setting data in user setting module 302 JS file contains the setting of all processing logics and user of JS mode method of calling to corresponding online font in JS file The content of data, JS file changes with the variation of user setting, and each user has exclusive JS file, answers all System 300 is generated with character library to provide using the link of the same JS file in the webpage of online font service, therefore, using word The additions and deletions of body are arranged, and need to only carry out in character library generation system 300, and character library generates system 300 and can automatically synchronize setting data To the JS file of user-specific.
In the above-mentioned technical solutions, it is preferable that mode customized for user is generally actively issued by user and is requested, and In addition to User ID, other data in request data are user according to the autonomous selection of request rule or customized submission.
In the above-mentioned technical solutions, it is preferable that acquisition modes automatic for system, request data all by system according to Family is automatically obtained in the page setup that character library generates setting and user in system 300, and character library is generated system 300 and existed based on user Character library generates the setting data in system 300, obtains webpage domain name, and online workable for filtering out user according to webpage domain name Then font is matched to content of text corresponding with the online font in webpage, to text content duplicate removal, and by scheduled Encryption rule generates encrypted characters string, and can also determine the online font format needed according to the browser type of webpage, Such as TTF, EOT, WOFF, SVG.In addition, being produced a plurality of if character library generates system 300 and is matched to a plurality of online fonts Request data.
In the above-mentioned technical solutions, it is preferable that acquisition modes automatic for system, character library generates system 300 can be according to asking The processing module in processing module 308 is sought, difference is sent respectively and asks summed data, it is intended to reduce data traffic and improve processing speed Degree.
In the above-mentioned technical solutions, it is preferable that data check submodule is mainly used for judging whether the data of each request accord with Scheduled verification rule is closed, illegal request and malicious requests is avoided, guarantees data security.If examining failure, abort request Failed message is handled and returned, enters judging submodule if verifying successfully.
In the above-mentioned technical solutions, it is preferable that whether judging submodule is for permission judgement and extract and simplify small library and sentence It is disconnected.Permission judgement is generally basede on setting data and character library of the user in character library generation system 300 and generates having for the record of system 300 Imitate data, it is intended to guarantee user and system data safety.After being judged by permission, then it is made whether to extract and simplifies small library Judgement can inquire the historical record for whether having this request data according to the encrypted characters string of request data first, if it is not, A newly-increased record, and small character library module is simplified into extracting;If so, format needed for then judging simplifies whether small library is deposited If it does, directly small library is simplified using this, if it does not exist, then simplifying small character library module into extracting.
In the above-mentioned technical solutions, it is preferable that extraction is simplified small character library module and can be selected original big according to required font TTF character library, and required content of text is combined, big TTF character library is cut to small TTF character library.There are two types of the modes specifically cut, First is that the extra font GLYPH data in big TTF character library are deleted, only to retain the font GLYPH data of needs, second is that From big TTF character library, the font GLYPH data that user needs successively are extracted, are then generated with the font GLYPH data extracted small TTF character library.After small TTF character library is extracted successfully, into compression submodule.
In the above-mentioned technical solutions, it is preferable that various online words needed for compression submodule can be converted to small TTF character library The character library of physique formula, such as TTF, EOT, WOFF, SVG format.These formats are all compressed format, can be further reduced file Amount, the data volume of the client of reduction server transport to webpage, to improve page access speed.
In the above-mentioned technical solutions, it is preferable that have the returned data there are two types of form in returned data module 310, it is a kind of The data that webpage is directly written in CSS code by system 300 are generated for character library;Another kind is the chain for returning to the CSS file of user Connect with font usage mode, when the webpage that user disposes as required is accessed, character library generates system 300 will be according to receiving CSS requests to automatically generate corresponding CSS code, and CSS code is only effective in the accessed page.The return of both forms Data do not require user to have the relevant knowledge of font-face in CSS3, facilitate User Exploitation work.
In the above-mentioned technical solutions, it is preferable that user data memory module 312 is stored with the JS file of user-specific, uses All small libraries for simplifying small library, various online font formats that family uses.
In the above-mentioned technical solutions, it is preferable that the file of user-specific JS saves as in user data memory module 312 Physics save, bibliographic structure be system master catalog under Js/Users/ (User ID/1024)/(User ID %1024)/, file Name be by comprising the contents such as user name obtained by special Encryption Algorithm, to strengthen the safety of user data, Convenient for the service extension of subsequent file system.
In the above-mentioned technical solutions, it is preferable that in user data memory module 312 user using it is all simplify small library and The small library of various online font formats saves as physics preservation, and bibliographic structure is the Font/data/ under system master catalog Font ID/ (domain name ID/1024)/(domain name ID%1024)/, the entitled domain name for including of file, user name, fontname, in text What appearance was obtained by special Encryption Algorithm, to reinforce the safety of user data.In addition, for identical content, different-format The name for simplifying small library it is identical, consequently facilitating character library generate system 300 in carry out character library lookup, improve character library generate system The working efficiency of system 300, convenient for the service extension of subsequent file system.
In the above-mentioned technical solutions, it is preferable that also there is cleaning modul, cleaning modul in user data memory module 312 It all simplify small library and its various online font format small libraries mainly for what user used and designs.This module is often preordained Shi Jinhang cleaning work only saves the small library of simplifying being accessed in nearest 7 days in the current data table for simplifying small library Information;Information not visited in nearest 7 days is all transferred to history lists, convenient for statistics later;And it is not visited in nearest 7 days The data for simplifying small library of physical store will be deleted;If deleted data are accessed again, system will mention again Required small library of simplifying is taken, does not influence the normal use of the setting data of user.By the technical solution, can only save must The data information wanted, avoids space waste.
System 300 is generated to the character library shown in Fig. 3 combined with specific embodiments below to be described further.
The user foundertest that ID is 4 generates system in character library by user setting module 302 according to demands of individuals The online font of setting is that upright quiet flower bud is simplified in 300, and the upright quiet simplified corresponding English name of flower bud is FZJLJW, and domain name is Http:// xiezi.foundertype.com, after being arranged successfully, user data memory module 312 judges user The setting data record of foundertest whether there is, if it does, existing prompt will be issued, be not repeated to save, if It is not present, then saves the domain-name information of user setting, wherein domain name ID is 3.
Meanwhile the JS file of user-specific is generated according to setting data, bibliographic structure is Js/ under system master catalog Users/ (User ID/1024)/(User ID %1024)/, filename be by comprising the contents such as user name by special plus What close algorithm obtained, specifically, the storage organization of JS file and name are as follows: Js/Users/0/4/4f4adcbf8c6f66dc fc8a3282ac2bf10a8f860346a02e832502628f7d87bf6ecb.js。
Next enter request data and obtain module 304, acquisition request data are divided into two ways: the customized mode of user With the automatic acquisition modes of system.
The customized mode of user is that user voluntarily selects the online font set and corresponding domain name, and actively fills in text This content, such as " university, BeiJing, China " are then forwarded to character library and generate system 300, and character library generates system 300 and receives necessity By content of text duplicate removal after data, and add being generated after the encryption of the content of text after User ID, domain name, font English name and duplicate removal Close character string 6ab591e473ce55fd05b0732b5aab6821, arrives this, and request data acquisition finishes.
Acquisition modes automatic for system, request data are all generated in system 300 according to user in character library by system It is arranged and the page setup of user automatically obtains, when webpage is accessed, character library generates system 300 and obtains current domain name, root The setting data in system 300 are generated in character library according to active user, judge whether active user has been arranged current domain name, if It is not set, then stop to obtain, if be arranged, obtains all font informations that active user is arranged under one's name in the current field, and The character font data of current page is obtained according to font information, to obtain corresponding content of text, to text content duplicate removal, most Afterwards, it as the customized mode of user, will be generated after the content of text encryption after User ID, domain name, font English name and duplicate removal Encrypted characters string.
Acquisition modes automatic for system, when domain name is http://xiezi.foundertype.com using online word When the webpage of body is accessed, it is first determined active user foundertest judges whether this user is real user.When sentencing Disconnected result is when being, to obtain current domain name, and judge that character library generates the record whether system 300 has current domain name.In addition, also wanting Judge there be setting independent of domain name http://xiezi.foundertype.com in the setting data of user foundertest It sets, when there is setting, determines that setting font for user under this domain name is simplified for upright quiet flower bud, corresponding English name is FZJLJW, then, obtaining the simplified content of text of the quiet flower bud of Founder in the page is " university, BeiJing, China ", is gone to text content Weight, and the content of text after User ID, domain name, font English name and duplicate removal is encrypted, to generate encrypted characters string 6ab591e4 73ce55fd05b0732b5aab6821.And the online font lattice needed can also be determined according to the browser type of webpage Formula, such as TTF, EOT, WOFF, SVG.By taking EOT type as an example, the character library of the EOT type needed for generating the compression of target character library Afterwards, the file storage structure of compressed character library and name are identical as former target character library, and only file format is different.
Acquisition modes automatic for system, the related data of a plurality of online fonts in available same webpage, then for These request datas generate system 300 to character library one by one and issue request.
Mode customized for user directly issues request simultaneously to server as long as getting complete request data Send whole request datas;Circulation is issued and is asked if getting a plurality of partial data by acquisition modes automatic for system It asks and sends whole request datas.
Acquisition modes automatic for system only transmit necessary data to reduce data transmission, to avoid flow waste, add Fast page access speed.
In the above-mentioned technical solutions, a complete request data, i.e., the user for being 4 for ID are only got Foundertest, online font are that upright quiet flower bud is simplified, and corresponding English name is FZJLJW, the entitled http of application domain: // Xiezi.foundertype.com, content of text are " university, BeiJing, China ", and encrypted characters string is 6ab591e473ce55fd0 5b0732b5aab6821, the type for simplifying small library of required online font are EOT.
Fig. 4 shows the specific flow chart that the processing character library in the character library generation system of Fig. 3 generates request data.
As shown in figure 4, the detailed process that processing character library generates request data includes:
Step 402, data check.By data check submodule, it is to user foundertest, online font font Upright quiet flower bud is simplified, using domain name http://xiezi.foundertype.com, encrypted characters string 6ab591e473ce55fd 05b0732b5aab6821, required online font the type EOT for simplifying small library verified, if all data all meet Verification rule, then be proved to be successful, and otherwise, authentication failed enters step 412, stops data processing.
Step 404, permission judges.Permission judging submodule, which judges that user generates in system 300 in character library, whether there is, such as Fruit user is not present, and enters step 412, stops data processing, if user exists, then judges that character library generates in system 300 and is The no record for having current domain name stops data processing if not provided, entering step 412, if so, it is current then to continue judgement Whether user has been arranged current domain name and current font.If not set, 412 are entered step, stops data processing, if It has been be arranged that, then enter step 406.
For example, ID is 4 user foundertest presence, domain name http://xiezi.foundertype.com is in character library There is record in generation system 300, and it is that upright quiet flower bud is simplified that user, which is already provided at line font in user setting module 302, side The just quiet simplified corresponding English name of flower bud be FZJLJW, with application domain name http://xiezi.foundertype.com it is corresponding at Function, therefore judge that the request data has the right to carry out character library to simplify, enter step 406.
Step 406, record and file judgement.Character library is searched according to encrypted characters string to generate in system 300 with the presence or absence of note Record, if it does not exist, then being directly entered step 408;If it is present continuing to judge required to simplify whether small character library file is deposited If simplifying the presence of small character library file, returned data module 310 will be directed into, calling is already present to simplify small character library text Otherwise part enters step 408.
In the simplified example of the upright quiet flower bud of above-mentioned user setting, because being to request for the first time, encrypted characters string 6a B591e473ce55fd05b0732b5aab6821 character library generate system 300 in there is no record, illustrate it is corresponding simplify it is small Font file is also centainly not present, and character library, which generates system 300, to add the record of this request character string, and is directly entered extraction essence Simple small library submodule.
Step 408, it extracts and simplifies small library.The user setting Record ID found by permission judging submodule is saved, Character library generates clear original word library storing directory in system 300, can quickly navigate to upright quiet flower bud letter according to upright quiet flower bud is simplified " university, BeiJing, China " is then converted to specific UNICODE (Unicode) coding " 4E2D/ by the original big TTF character library of body 56FD/5317/4EAC/5927/5B66 " obtains the font GLYPH data information of these words in original big TTF character library, and These GLYPH font datas needed are extracted, or delete other unnecessary font datas, in conjunction with the font configuration in TTF Table is reorganized into one and new simplifies small TTF character library.Since filename is led to by domain name, user name, fontname, content of text It crosses special Encryption Algorithm to obtain, so simplifying the storage organization of small TTF font file and naming as follows: Font/data/8/0/ 3/6ab591e473ce55fd05b0732b5aab68211408435106028.ttf。
Step 410, small library is simplified in compression.EOT class by taking EOT type as an example, needed for generating the compression of target character library After the character library of type, the file storage structure of compressed character library and name are identical as former target character library, and only file format is different. Such as: Font/data/8/0/3/6ab591e473ce55fd05b0732b5aab682114084351 06028.eot.In addition, When compressing failure, 412 are entered step, stops data processing.
It is required simplify small character library file be ready for it is ready after, as long as webpage is accessed, then returned data module 310 will simplify small character library file accordingly according to encrypted characters string and required online font character library format acquisition, and generate Available CSS code, by the accessed webpage of code write-in, to realize the effect of online font, wherein CSS code is as follows:
<style type='text/css'>
@font-face{
font-family:'FZJLJW';
src:url('***);
Src:url (' * * *? #iefix') format (' embedded-opentype'),
url('***')format('TrueType')
}
</style>
Chained address and the parameter of small character bank interface are simplified in the return that wherein * * * represents returned data module 310, are simplified small Character library interface directly feeds back the font file for simplifying small library according to parameter.
When webpage is accessed, character library, which generates system 300, can accurately judge to access the browser type of this webpage, return Returning the CSS code that data module 310 returns will be returned according to browser type, when browser type is IE, the CSS of write-in Code should are as follows:
<style type=" text/css ">
@font-face{
font-family:FZJLJWJ;
src:url('http://xiezi.foundertype.com/Webfont/Ashx/forjs/ Getfont.ashx? act=getfont&cvfid=6ab591e473ce55fd05b0732b5aab6821&forma t= eot');
src:url('http://xiezi.foundertype.com/Webfont/Ashx/forjs/ Getfont.ashx? act=getfont&cvfid=6ab591e473ce55fd05b0732b5aab6821&forma t= Eot? #iefix') format (' embedded-opentype')
.FZJLJWJ{FONT-FAMILY:'FZJLJWJ'}
</style>
Wherein, the IE browser of the compatible each version of CSS code of the page is written.
According to browser type, the online font of TTF format is requested, then the CSS generation of the page is written in returned data module 310 Code are as follows:
<style type=" text/css ">
@font-face{
font-family:FZJLJWJ;
src:url('http://xiezi.foundertype.com/Webfont/Ashx/forjs/ Getfont.ashx? act=getfont&cvfid=6ab591e473ce55fd05b0732b5aab6821&forma t= ttf')
format('truetype');
}
.FZJLJWJ{FONT-FAMILY:'FZJLJWJ'}
</style>
Code, which is presented, in returned data module 310 in this manner can establish door chain, and be returned according to the needs of browser Return be suitble to simplify small library type, can be further reduced the wasting of resources, promote webpage and be loaded into speed, also, do not require User has the relevant knowledge of@font-face in CSS3, facilitates User Exploitation work.
Fig. 5 shows the block diagram of server according to an embodiment of the invention.
As shown in figure 5, the server 500 of one embodiment of the present of invention, including character library generate system 502 and (are equivalent to Fig. 2 Character library in the embodiment shown generates system 200), character library generates system 502 and is used for the setting command or pre- that basis receives If font info file, setting character library generate request data, and according to character library generate request data, determine original character library, and Target character library is extracted in original character library.
In the technical scheme, user can carry out online font setting according to demands of individuals, and setting option includes fontname With webpage domain name, and the font info file of the user-specific is generated according to the fontname of setting and webpage domain name, these are default Font info file be generally JS (JavaScirpt, literal translate formula scripting language) file.In addition, working as the fontname of user setting When updating with webpage domain name, font info file also updates therewith.When user needs to obtain the character library simplified, Ke Yizhi It connects the character libraries such as name and webpage domain name that set font and generates request data, can also be read in character library generation system 502 preset Font info file directly acquires the contents such as the fontname being arranged and webpage domain name, and is generated and requested according to the character library of setting Data the operation such as are cut out or extract to corresponding original character library, to obtain target data, obtained target data is fitted Using family need simplify after character library.By the technical solution, the character library of low capacity can be generated according to the needs of users, is gone Except the redundancy text largely taken less than, to optimize webpage loading velocity, the usage experience of user is promoted.
In the above-mentioned technical solutions, it is preferable that character library generates system 502 and is used for: according to the setting command received, for hair ID setting webpage domain name, fontname and the text data of setting command out, and duplicate removal is carried out to text data, or according to preset Font info file obtains webpage domain name, fontname and the text data of webpage when accessing webpage, and carries out to text data Duplicate removal;And according to the text data after webpage domain name, fontname and duplicate removal, encrypted characters are generated according to predetermined encryption rule String, and the type of the browser according to webpage, determine the type of required target character library.
In the technical scheme, when user needs to obtain the character library simplified, can directly set font name, webpage domain name And text data, it can also be generated in system 502 in character library and read preset font info file, directly acquire the word being arranged Body name, webpage domain name and text data.After obtaining fontname, webpage domain name and text data, further to text data into Row deduplication operation, to delete repeated data therein.
It in the technical scheme, can be with according to the text data after User ID, fontname, webpage domain name and duplicate removal Encrypted characters string is generated, for example, when the entitled quiet flower bud of Founder of the font needed for user foundertest is simplified, according to the font English name FZJLJW and webpage in the font duplicate removal after content of text " university, BeiJing, China ", encrypted characters can be generated String 6ab591e473ce55fd05b0732b5aab6821.
In addition, in the technical scheme, required target character library can also be determined according to the type of the browser of webpage Type, wherein the type of target character library includes TTF (True Type Font), EOT, WOFF, SVG etc., for example, when unlatching When webpage is the webpage of IE browser, it can determine that the type of target character library is EOT.
In the above-mentioned technical solutions, it is preferable that it includes ID, domain name, fontname, encrypted characters string that character library, which generates request data, With the type of required target character library.
In the above-mentioned technical solutions, it is preferable that character library generates system 502 and is also used to according to preset font info file, Determine that character library generates whether request data meets predetermined verification rule;Make a reservation for verification rule when determining that character library generation request data meets When then, allow to extract target character library in original character library.
In the technical scheme, it before extracting target character library, needs to verify the permission for extracting target character library, than Such as, judging that the ID of user is generated in system 502 in character library whether there is, if the ID is not present, stop data processing, not for The user generates the character library simplified.For another example, judge that character library generates whether system 502 is stored with current domain name, if character library Not stored current domain name, then stop data processing in generation system 502, does not generate the character library simplified for the user.Pass through this Technical solution allows character library to generate system 502 as specific user or can only carry out simplifying for character library according to specific data, The safety of data can also be protected to avoid malicious requests to avoid illegal request, convenient for putting goods on the market.
In the above-mentioned technical solutions, it is preferable that character library generates system 502 and is also used to determine text data in original character library GLYPH font;It extracts the GLYPH font of text data or deletes the GLYPH font other than text data, to generate target Character library.
In the technical scheme, the GLYPH font in original character library can be cut out or is extracted, to generate capacity more The small target character library more simplified, so that the redundancy text that removal largely takes less than promotes user to optimize webpage loading velocity Usage experience.
In the above-mentioned technical solutions, it is preferable that character library generates system 502 and is also used to the target character library according to type to generation It is compressed, to obtain the target character library of required type.
In the technical scheme, target character library can be compressed into TTF (True Type Font), EOT, WOFF, SVG etc. Type, by taking EOT type as an example, after the character library of the EOT type needed for generating the compression of target character library, the text of compressed character library Part storage organization and name are identical as former target character library, and only file format is different.It, can be with by being compressed to target character library The target character library for obtaining multiple format, to widen the scope of application of the character library after simplifying.
In the above-mentioned technical solutions, it is preferable that character library generates system 502 and is also used to store font info file, encrypted word Symbol string and target character library, for when the encrypted characters string generated again is identical as the encrypted characters string of storage, calling and storage The corresponding target character library of encrypted characters string, and webpage is written into the content of target character library in the form of CSS code.
In the technical scheme, font info file, encrypted characters string and target character library etc. are stored, when again into When row character library is simplified, if the encrypted characters string generated is identical as the encrypted characters string of storage, the correspondence of storage is called directly The target character library of type, the generation work without carrying out target character library again optimize the speed of webpage load, greatly It is big that the user experience is improved.
The technical scheme of the present invention has been explained in detail above with reference to the attached drawings, according to the technical solution of the present invention, can basis The character library of user setting generates request data, corresponding original character library is cut out or is extracted etc. operates, after being simplified The character library of low capacity eliminates the redundancy text largely taken less than, to optimize webpage loading velocity, improves making for user With experience.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (11)

1. a kind of character library generation method characterized by comprising
According to the setting command or preset font info file received, character library is set and generates request data;
Request data is generated according to the character library, determines original character library, and extract target character library in the original character library;
The setting command or preset font info file that the basis receives, setting character library generates request data, specific to wrap It includes:
According to the setting command received, webpage domain name, fontname and text are set to issue the ID of the setting command Data, and duplicate removal is carried out to the text data, or
According to the preset font info file, the webpage domain name of the webpage, the word are obtained when accessing webpage Body name and the text data, and duplicate removal is carried out to the text data;And
According to the text data after the webpage domain name, the fontname and duplicate removal, generates and add according to predetermined encryption rule Close character string, and the type of the browser according to the webpage determine the type of the required target character library.
2. character library generation method according to claim 1, which is characterized in that it includes described that the character library, which generates request data, The type of ID, domain name, the fontname, the encrypted characters string and the required target character library;And
Before extracting the target character library in the original character library, further includes:
According to the preset font info file, determine that the character library generates whether request data meets predetermined verification rule;
When determining that the character library generation request data meets the predetermined verification rule, permission is extracted in the original character library The target character library.
3. character library generation method according to claim 2, which is characterized in that described to extract mesh in the original character library Marking-up library, specifically includes:
The GLYPH font of the text data is determined in the original character library;
It extracts the GLYPH font of the text data or deletes the GLYPH font other than the text data, with Generate the target character library.
4. character library generation method according to any one of claim 1 to 3, which is characterized in that further include:
The target character library of generation is compressed according to the type of the target character library, to obtain the required target word The target character library of the type in library.
5. character library generation method according to claim 4, which is characterized in that further include:
Store the font info file, the encrypted characters string and the target character library, for described in ought generating again plus When close character string is identical as the encrypted characters string of storage, the target corresponding with the encrypted characters string of storage is called Character library, and the webpage is written into the content of the target character library in the form of CSS code.
6. a kind of character library generates system characterized by comprising
Setting unit is arranged character library and generates request data according to the setting command or preset font info file received;
Processing unit generates request data according to the character library, determines original character library, and extract mesh in the original character library Marking-up library;
The setting unit is used for:
According to the setting command received, webpage domain name, fontname and text are set to issue the ID of the setting command Data, and duplicate removal is carried out to the text data, or according to the preset font info file, obtain institute when accessing webpage The webpage domain name, the fontname and the text data of webpage are stated, and duplicate removal is carried out to the text data;And
The setting unit further include:
Character string determination unit, according to the text data after the webpage domain name, the fontname and duplicate removal, according to predetermined Encryption rule generates encrypted characters string;
Type determining units determine the type of the required target character library according to the type of the browser of the webpage.
7. character library according to claim 6 generates system, which is characterized in that it includes described that the character library, which generates request data, The type of ID, domain name, the fontname, the encrypted characters string and the required target character library;And
The character library generates system further include:
Determination unit, before extracting target character library in the original character library, according to the preset font info file, really Whether the fixed character library generation request data meets predetermined verification rule, and meets when the determining character library generates request data When the predetermined verification rule, the target character library is extracted in permission in the original character library.
8. character library according to claim 7 generates system, which is characterized in that the processing unit is used for:
The GLYPH font of the text data is determined in the original character library, and extracts the described of the text data The GLYPH font other than GLYPH font or the deletion text data, to generate the target character library.
9. the character library according to any one of claim 6 to 8 generates system, which is characterized in that further include:
Compression unit compresses the target character library of generation according to the type of the target character library, needed for acquisition The target character library of the type of the target character library.
10. character library according to claim 9 generates system, which is characterized in that further include:
Storage unit stores the font info file, the encrypted characters string and the target character library, for that ought generate again The encrypted characters string it is identical as the encrypted characters string of storage when, call with store the encrypted characters string it is corresponding The target character library, and the webpage is written into the content of the target character library in the form of CSS code.
11. a kind of server, which is characterized in that generate system including the character library as described in any one of claim 6 to 10.
CN201410654465.9A 2014-11-17 2014-11-17 Character library generation method, character library generate system and server Expired - Fee Related CN105677646B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410654465.9A CN105677646B (en) 2014-11-17 2014-11-17 Character library generation method, character library generate system and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410654465.9A CN105677646B (en) 2014-11-17 2014-11-17 Character library generation method, character library generate system and server

Publications (2)

Publication Number Publication Date
CN105677646A CN105677646A (en) 2016-06-15
CN105677646B true CN105677646B (en) 2019-03-01

Family

ID=56944752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410654465.9A Expired - Fee Related CN105677646B (en) 2014-11-17 2014-11-17 Character library generation method, character library generate system and server

Country Status (1)

Country Link
CN (1) CN105677646B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101795951B1 (en) * 2016-07-20 2017-12-01 숭실대학교산학협력단 System for providing font, apparatus for providing metafont and method for controlling the apparatus
CN106502968A (en) * 2016-10-12 2017-03-15 北京奇虎科技有限公司 The method and device of data processing
CN107092585A (en) * 2017-04-11 2017-08-25 王建明 Mongolian display methods and system based on scalable vector graphicses
CN108009192B (en) * 2017-09-30 2020-09-29 北京车和家信息技术有限公司 Webpage text loading method, device and system
CN107704615B (en) * 2017-10-24 2022-01-04 北京有字库网络科技有限公司 Webpage font display method and system based on Chinese font subset
CN109522975A (en) * 2018-09-18 2019-03-26 平安科技(深圳)有限公司 Handwriting samples generation method, device, computer equipment and storage medium
CN109862031A (en) * 2019-03-13 2019-06-07 娄奥林 A kind of methods of pair of anti-crawler of encryption
CN110705210A (en) * 2019-09-18 2020-01-17 北京中网易企秀科技有限公司 Chinese font loading method and device
CN110826005B (en) * 2019-11-13 2022-12-16 北大方正集团有限公司 File generation method and device, electronic equipment and storage medium
CN112818145B (en) * 2021-01-19 2022-09-09 上海义启信息科技有限公司 Intelligent font style rendering system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833747A (en) * 2010-05-10 2010-09-15 深圳市永达电子股份有限公司 Method and system for generating digital watermark-based safe word stock
CN101369953B (en) * 2008-09-17 2010-10-20 北大方正集团有限公司 Font network distribution method and system
CN102289427A (en) * 2011-08-31 2011-12-21 深圳市茁壮网络股份有限公司 Method, client side and server for realizing multifont display
CN103186644A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Method, equipment and system for downloading front files

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369953B (en) * 2008-09-17 2010-10-20 北大方正集团有限公司 Font network distribution method and system
CN101833747A (en) * 2010-05-10 2010-09-15 深圳市永达电子股份有限公司 Method and system for generating digital watermark-based safe word stock
CN102289427A (en) * 2011-08-31 2011-12-21 深圳市茁壮网络股份有限公司 Method, client side and server for realizing multifont display
CN103186644A (en) * 2011-12-31 2013-07-03 北大方正集团有限公司 Method, equipment and system for downloading front files

Also Published As

Publication number Publication date
CN105677646A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN105677646B (en) Character library generation method, character library generate system and server
US10212563B2 (en) Updating web resources
JP3270351B2 (en) Electronic document processing device
CA2802746C (en) System and methods for facilitating the synchronization of data
US8195772B2 (en) Configuration setting
US10223339B2 (en) Web-intrinsic interactive documents
WO2016085822A1 (en) Systems and methods for editing a file in a non-native application using an application engine
JP2001282674A (en) Internet-based font server
CN110166465A (en) Processing method, device, server and the storage medium of access request
US10324896B2 (en) Method and apparatus for acquiring resource
CN104516920B (en) Data query method and data query system
US9729672B2 (en) Collaborative editing
US11308275B2 (en) Management of content tailoring by services
CN107783770B (en) Page configuration updating method, device, server and medium
JP5049172B2 (en) Reverse proxy system
CN110377579A (en) File memory method, device and server
CN109634916A (en) File storage and method for down loading, device and storage medium
JP2005327154A (en) Html file processing method and program
US20150106691A1 (en) Generation of Combined Documents from Content and Layout Documents Based on Semantically Neutral Elements
US9338220B1 (en) System and method to anonymize data transmitted to a destination computing device
CN106612336A (en) Picture preloading method and picture preloading device
CN109308336A (en) Data processing method, processing equipment and storage medium
CN109923538A (en) Text retrieval device, text searching method and computer program
US10929499B2 (en) System for loading software modules
JP2004054619A (en) Document search system and method and document search program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220623

Address after: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee after: Peking University

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871 No. 5, the Summer Palace Road, Beijing, Haidian District

Patentee before: Peking University

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190301