Method for optimizing font package loading and font package management system

By using a sub-package optimization technique, the font package is split into multiple sub-packages and the loading order is set to generate font.css and font.js files. This solves the problem of long font package loading time, improves user experience and development efficiency, and simplifies the maintenance process.

CN119003907APending Publication Date: 2024-11-22DMAI (GUANGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411018440.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional font packages are too large, resulting in long loading times, which affects the user interface display and increases the development workload.

Method used

By employing a sub-package optimization technique, the font package is split into multiple sub-font packages, and the loading order and method are set according to priority to generate font.css and font.js files. The loading process is optimized using cloud servers and OSS platforms.

Benefits of technology

It enables fast loading of font packages, optimizes user experience, simplifies development process, reduces costs, makes reasonable use of browser caching, and ensures that the latest content is displayed in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003907A_ABST
    Figure CN119003907A_ABST
Patent Text Reader

Abstract

The invention discloses a method for optimizing font package loading and a font package management system. The method comprises the following steps: acquiring font packages of a plurality of fonts from a character library; sub-packaging the font package according to a set sub-packaging rule to obtain a plurality of sub-font packages; determining the loading time sequence and loading mode of the sub-font packages according to the priorities; naming subpackage names of the sub-font packages according to the priorities and font types, uploading the subpackage names to a cloud server, and obtaining an online link of each sub-font package; setting a font-face rule according to the online path and the corresponding font category, generating a font. Css file, and enabling the sub-font packets with different priorities to correspond to different font. Css files; the font.css file is uploaded to an oss platform, and a css online link of the loaded sub-font package is obtained; and according to the css online link, generating a function library code required by the item to load a fot.css file, and generating a fot.js file. According to the method and the device, the website is more attractive by using the designed fonts, the font package loading is accelerated, and the user experience and the interface display fluency are optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of font package loading, and in particular to a method for optimizing font package loading and a font package management system. Background Art

[0002] For traditional web developers, font selection is limited. Only a few fonts are guaranteed to be compatible with all popular operating systems. The built-in fonts do not meet the needs of existing projects. If we want to use some more design-oriented fonts, we generally use @font-face to load font files. @font-face is a rule in CSS that allows web pages to use any available fonts, not limited to standard "websafefonts" (i.e. standard fonts that are widely supported on the web). This provides web designers with greater flexibility and creative space because they can use more unique fonts to enhance the design of the website.

[0003] However, for font packages, the font file size is too large. An ordinary font package is about 6-10M. If there are multiple fonts of different thicknesses, the size can reach 20-40M. The long loading time will lead to poor user interface display effects and other problems. We are in urgent need of finding a solution that can support good-looking fonts and provide users with a smoother operating experience, while simplifying development work as much as possible and improving work efficiency.

[0004] Therefore, how to provide a method for optimizing font package loading and a font package management system for efficiently implementing external font loading is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] In view of the above research status and existing problems, the present invention provides a technical solution that not only realizes the page design effect, but also can quickly load and display, achieves efficient development, efficient maintenance, and real-time update while ensuring the rational use of cache, as well as a font package management system that quickly implements the project access font package optimization loading solution, realizes intelligent subpackaging, project subpackaging management and subpackaging code rapid access management.

[0006] The present invention first provides a method for optimizing font package loading, comprising the following steps:

[0007] S1: Obtain font packages of several fonts from the text library;

[0008] S2: Sub-packaging the font package according to a set sub-packaging rule to obtain multiple sub-font packages;

[0009] S3: setting a priority for each of the sub-font packages, and determining a time sequence and a loading method for the sub-font packages according to the priority;

[0010] S4: naming the sub-packages of the sub-font package according to the priority and the font category, uploading the sub-packages to the cloud server, and obtaining an online link of each sub-font package on the cloud server;

[0011] S5: setting @font-face rules according to the online path and the corresponding font category, generating a font.css file for guiding the operation of loading the sub-font package from the cloud server, and the sub-font packages of different priorities correspond to different font.css files;

[0012] S6: The font.css file is uploaded to the OSS platform, and the CSS online link for loading the sub-font package is obtained;

[0013] S7: According to the css online link, generate the function library code required for the project to load the font.css file and generate the font.js file.

[0014] Preferably, the step of determining the time sequence of loading the sub-font packages in S3 includes: setting the priority sequence of the sub-font packages according to the font type and / or the frequency of use of the font text.

[0015] Preferably, the loading method in S3 includes:

[0016] Sub-font packages are loaded step by step: the corresponding sub-font packages are loaded in descending order of priority, and the loading of the next sub-font package starts after the previous sub-font package is loaded;

[0017] Synchronous loading of sub-font packages: The loading start time of a low-priority sub-font package is earlier than the loading start time of a high-priority sub-font package, so that the loading completion time of the low-priority sub-font package and the high-priority sub-font package is synchronized.

[0018] Preferably, the S6 further comprises the following steps:

[0019] The font.css file is named according to the priority of the sub-font package.

[0020] Preferably, the S7 comprises the following steps:

[0021] S71: Create a link tag using a function library, add an online link of the sub-font package to the href attribute of the link tag, and the link tag points to the location of the font.css file;

[0022] S72: Create a font.js file for dynamically adding the link tag to the page, thereby loading the font.css file; for multiple sub-font packages, load the multiple sub-font packages according to the loading method.

[0023] Preferably, the method further includes the step of setting style classes of different fonts:

[0024] Create a style class for the specified font category, the font-family attribute of the style class contains the sub-package names of all sub-font packages corresponding to the specified font category.

[0025] The present invention further provides a font package management system according to the method for optimizing font package loading, comprising: a sub-packaging rule management module, a sub-packaging management module and a code generation module; wherein,

[0026] The sub-packaging rule management module is used to set the constraint conditions and sub-packaging rules of the text library;

[0027] The sub-packaging management module is used to sub-pack the font package according to the set sub-packaging rules to obtain multiple sub-font packages; set a priority for each sub-font package, and determine the time sequence and loading method of the sub-font package according to the priority; name the sub-package of the sub-font package according to the priority and font category, upload it to the cloud server, and obtain the online link of each sub-font package on the cloud server;

[0028] The code generation module is used to set the @font-face rule according to the online path and the corresponding font category, generate the font.css file, and guide the operation of loading the sub-font package from the cloud server. The sub-font packages of different priorities correspond to different font.css files; the font.css file is uploaded to the OSS platform to obtain the CSS online link for loading the sub-font package; according to the CSS online link, the function library code required for the project to load the font.css file is generated to generate the font.js file.

[0029] Preferably, it further comprises a text library management module, including a plurality of text library file modules, for performing editing operations on the text library file modules and / or performing editing operations on the text library data.

[0030] Preferably, it also includes a project information management module, which is used to use at least the sub-packaging rule management module, the sub-packaging management module and the code generation module to load the resource files required for the project construction and implement the font package, and perform editing operations on the project.

[0031] Preferably, the project information management module is also used to perform the following operations:

[0032] Determine whether the sub-packaging rule has changed. If so, update the content of the online link of the sub-font package, or update the content of the online link of the sub-font package and the corresponding style class; calculate a hash value based on the online link of the sub-font package and the content of the style class, and use the hash value to name the sub-font package and the style class; add a timestamp to the online link of the font.js file required for loading the generated font package introduced in the project.

[0033] Compared with the prior art, it has the following beneficial effects:

[0034] (1) A method for optimizing font package loading is implemented to ensure complete and fast loading, thus optimizing the user experience.

[0035] (2) Simplified the font package generation and reference process, improved development efficiency, and reduced development costs.

[0036] (3) The updating of font package sub-packaging rules can be done with zero manual maintenance cost, without the need for additional modification or release of project code.

[0037] (4) By changing the reference and naming methods, the problem of not being able to display the latest content in a timely manner after updating is solved. At the same time, the browser cache can be reasonably used without updating, so that the font package can be loaded in seconds. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work.

[0039] Figure 1 A flow chart of a method for optimizing font package loading provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of the font package segmentation principle provided by an embodiment of the present invention;

[0041] Figure 3 A flow chart of font.js file generation provided in an embodiment of the present invention;

[0042] Figure 4 A structural block diagram of a font package management system provided by an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of the font package management system interface provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] The present invention provides a solution for solving the problem of long loading time caused by excessive font file size, while seeking a convenient and efficient method for optimizing font loading that both ensures the beauty of the interface and improves the user experience.

[0046] A first aspect of the present invention discloses a method for optimizing font package loading.

[0047] The embodiment of the present invention first uses a sub-packaging optimization technology to split the font package into multiple smaller font packages. The purpose is to reduce the amount of code that needs to be downloaded during initial loading and to rationally utilize bandwidth to improve the performance and loading speed of the font package. At the same time, in order to provide a better user experience for the interface, the rules need to set the most important font of the project as the first priority sub-package, and load the first priority sub-package in advance to minimize the delay time of the page font effect display and optimize the user experience. The following steps are included:

[0048] S1: Get font packages of several fonts from the text library. When multiple font types are required, each font to be used uses the following packaging and loading rules.

[0049] S2: Sub-packaging the font package according to the set sub-packaging rule to obtain multiple sub-font packages.

[0050] S3: setting a priority for each sub-font package, and determining the time sequence and loading method of the sub-font packages according to the priority.

[0051] In order to enable the solution to be quickly applied to the project, quickly implemented, and reduce the development cost of project access subcontracting, the present invention further optimizes the font package loading method flow as follows:

[0052] S4: naming the sub-font package according to the priority and font category, uploading the sub-font package to the cloud server, and obtaining the online link of each sub-font package on the cloud server;

[0053] S5: Set @font-face rules according to the online path and the corresponding font category, generate a font.css file, and use it to guide the operation of loading sub-font packages from the cloud server. Sub-font packages with different priorities correspond to different font.css files.

[0054] S6: Upload the font.css file to the OSS platform and obtain the CSS online link for loading the sub-font package;

[0055] S7: According to the CSS online link, generate the function library code required for the project to load the font.css file and generate the font.js file.

[0056] In one embodiment, text libraries of various types of latitudes are organized as a text library for use by users when setting subpackaging rules. The text library includes all Chinese characters and punctuation marks, all Chinese characters, basic punctuation marks, basic Chinese characters, commonly used Chinese characters, English letters, numbers, special symbols and other texts.

[0057] In one embodiment, the font package to be used is divided into multiple smaller font packages according to the required sub-packaging rules. The sub-packaging rules can be a combination of basic font libraries or a custom font library. The custom font library supports uploading txt files to add, and also supports manual addition.

[0058] like Figure 2 As shown, font package a is divided into sub-font package a containing basic text characters and sub-font package a containing remaining text characters, wherein the usage frequency of basic text characters is higher than the usage frequency of remaining text characters, so the priority of "sub-font package a-basic text characters" is higher than that of "sub-font package a-remaining text characters".

[0059] In one embodiment, the step of determining the time sequence of sub-font packages loading in S3 includes: setting the priority sequence of sub-font packages according to the font type and / or the frequency of use of font characters.

[0060] In one embodiment, the loading method in S3 includes:

[0061] Sub-font packages are loaded in steps: The corresponding sub-font packages are loaded in order of priority from high to low. The loading of the next sub-font package starts after the previous sub-font package is loaded. The font package with the highest priority is loaded first to speed up the display of the page effect for the first preview. After loading the first sub-package, other font packages with lower usage frequency are loaded. Step-by-step loading is suitable for the case where the sub-package with the highest priority contains most of the text of the main body of the website, and the delayed loading of other font packages has little impact.

[0062] Synchronous loading of sub-font packages: The loading start time of a low-priority sub-font package is earlier than that of a high-priority sub-font package, so that the loading completion time of the low-priority sub-font package and the high-priority sub-font package are synchronized, that is, the loading start time of other font packages is advanced, thereby achieving the effect of synchronous loading completion display.

[0063] In one embodiment, in S4, the sub-package name is identified by adding a serial number to the sub-font package loading priority. Different sub-font packages use different names, and the names correspond to the font names. The font name refers to the name used when referencing the font in CSS.

[0064] It should be noted that for each font you need to use, write a @font-face rule that specifies the location of the font file (online path) and the font name. For example, if the font files are stored on a remote server, you can point to these files through URLs.

[0065] In one embodiment, after S6 performs the uploading step, each CSS file will have a URL address for online access. These URLs can be embedded in HTML documents to load these fonts in a browser.

[0066] In one embodiment, S6 further includes the following steps:

[0067] Combine all @font-face rules into a CSS file named font.css. This file contains the definitions of all custom fonts.

[0068] Name the font.css file according to the priority of the sub-font package, including naming the css file using font+priority.

[0069] In one embodiment, Figure 3 As shown in the figure, in S7, for the created font.css file, all @font-face rules are included, which define how to load font files from a remote server. Create a font.js file to dynamically add a link tag to the page to load the font.css file. Write a JavaScript function to generate and insert a link tag that points to the location of the font.css file. The specific steps include the following:

[0070] S71: Create a link tag using the function library, add the online link of the sub-font package to the href attribute of the link tag, and the link tag points to the location of the font.css file to load the font package style code after the page is onloaded;

[0071] S72: Create a font.js file for dynamically adding a link tag to the page to load the font.css file; for multiple sub-font packages, load the multiple sub-font packages according to the loading method.

[0072] In one embodiment, the step of setting the style classes of different fonts is also included:

[0073] Create a style class for the specified font category. The font-family property of the style class contains the sub-package names of all sub-font packages corresponding to the specified font category. For example, if you use the style of font a, set the font-family property to the fonts of multiple sub-packages defined by the font. The sample code is as follows: .font-a{font-family:font-a-1font-a-2font-an;}; By using the .font-a class, when the sub-package font with the highest priority is loaded, the page can display the style of font-a; after the other low-priority font packages are loaded, the text with low frequency of appearance will also be displayed using this font. In this way, the page can quickly display the theme font style and perfectly present the page design effect.

[0074] In web development, in order to improve font loading efficiency and reduce the number of HTTP requests, create a CSS class font-a for font A (which is split into multiple sub-font packages), and the font-family attribute of this class will contain the names of all sub-font packages.

[0075] The second aspect of the present invention provides a font package management system according to the first aspect, which is used to realize intelligent sub-packaging, project sub-packaging management and sub-packaging code rapid access management. It can batch apply font package loading operations to different projects and quickly implement them, thereby reducing development costs. It includes: a sub-packaging rule management module, a sub-packaging management module and a code generation module; wherein, Figure 4 As shown,

[0076] Sub-packaging rule management module, used to set constraints and sub-packaging rules for the text library;

[0077] The sub-packaging management module is used to pack the font package according to the set sub-packaging rules to obtain multiple sub-font packages; set a priority for each sub-font package, and determine the time sequence and loading method of the sub-font package according to the priority; name the sub-font package according to the priority and font category, upload it to the cloud server, and obtain the online link of each sub-font package on the cloud server;

[0078] The code generation module is used to set the @font-face rule according to the online path and the corresponding font category, generate the font.css file, and guide the operation of loading the sub-font package from the cloud server. Sub-font packages of different priorities correspond to different font.css files; the font.css file is uploaded to the OSS platform to obtain the CSS online link for loading the sub-font package; according to the CSS online link, the function library code required for the project to load the font.css file is generated to generate the font.js file.

[0079] In one embodiment, the subcontracting rules in the subcontracting rule management module may include certain text libraries, exclude certain text libraries, exclude the remaining texts in the previous rules, etc. The subcontracting rules created in the subcontracting rule management module can be directly used by the subcontracting rules in the project management module.

[0080] In one embodiment, it also includes a text library management module, including a number of text library file modules, which is used to perform editing operations on the text library file modules and / or perform editing operations on the text library data.

[0081] Furthermore, the text library file module includes the addition, deletion, modification and query, and the text library data can be added by adding or uploading text files.

[0082] In one embodiment, Figure 5 As shown, it also includes a project information management module, which is used to use at least a sub-package rule management module, a sub-package management module and a code generation module to load the resource files required for the project construction and implement font package loading, and perform editing operations on the project.

[0083] Furthermore, editing operations on projects include project lists and new project functions; new projects can set project names, upload project font packages, and set subcontracting rules. Subcontracting rules can directly use subcontracting rule templates, or you can select text in the text library to customize your own subcontracting rules. This module uses the above-mentioned text library management module, subcontracting management module, code generation module and other module functions to build resource files required for font package loading optimization for project construction. All font package optimizations are made interface-based, process-based, and automated, without the need for repeated development, reducing labor costs. It also adds visualization of subcontracting to reduce maintenance costs.

[0084] In this embodiment, the project information management module is also used to perform the following operations:

[0085] Determine whether the sub-packaging rules have changed. If so, update the content of the online link of the sub-font package, or update the content of the online link of the sub-font package and the corresponding style class; calculate the hash value based on the online link of the sub-font package and the style class content, and use the hash value to name the sub-font package and style class; add a timestamp to the online link of the font.js file required for loading the generated font package introduced in the project.

[0086] The above update process can achieve the effect of completing the update with zero manual maintenance cost after the management platform updates the subcontracting rules. During the specific implementation:

[0087] After the user operates the management platform to modify and update the rules, the platform determines the rule content changes and updates the font package link content and css style content;

[0088] If the link remains unchanged, the browser may force cache, which may cause content update failure. Therefore, the font package link and font package CSS style link are optimized to hash naming. The js online link required for generating font package loading introduced in the project needs to be timestamped to prohibit browser strong cache. Since the font style naming rules have not changed, there is no need to modify the project code without adding subpackages.

[0089] In this embodiment, the management platform supports email notification to developers to synchronize changes when the number of subpackages increases; developers can also reserve font-family values ​​to be compatible with the increase in subpackages without modifying the project code.

[0090] In this embodiment, the cache solution is also applicable to similar scenarios of SDK loading that needs to be frequently updated for others. Due to the large size of the SDK, it is more necessary to use the browser forced cache to improve the loading speed. Then, after the SDK is updated, the browser device cannot be updated in time because of the cache. A js function library file link for loading the SDK can be provided with a timestamp. When the SDK is updated, just update the hash value of the SDK link in the js that loads the SDK, and then overwrite the oss link content of the js with the latest content to complete the update.

[0091] In this embodiment, in order to speed up the loading speed, the js function library files, css style files, etc. are compressed and gzip loading is enabled.

[0092] The embodiment of the present invention realizes the use of designed fonts to make the website more beautiful and load quickly, thereby optimizing the user experience; at the same time, some fonts and characters that appear infrequently can also be perfectly displayed according to the design draft. At the same time, the font package reference process is simplified, the development efficiency is improved, and the complex and heavy development maintenance and update work are reduced. By changing the reference method and the naming method, the problem of not being able to display the latest content in time after the update is solved, and at the same time, the browser cache can be reasonably used without updating, so that the font package can be loaded in seconds.

[0093] The second aspect of the embodiment of the present invention is applicable to all the steps in the first aspect of the embodiment. The following are the steps for using the second invention in the specific implementation:

[0094] S100: The browser device opens the font package management system and obtains the font package file according to the project font requirement;

[0095] S200: The management platform creates a project to set font package information. Upload the font package file required for the project. You can customize the font package name or automatically identify the font package file name as the font name required later.

[0096] S300: Analyze the characteristics of the project text and set the font package sub-packaging rules; after saving, the management platform automatically sub-packs the uploaded font package according to the font package sub-packaging rules, uploads the sub-packaging to OSS to obtain the font package online link, and generates the css style online link and js function library link required for project loading.

[0097] S400: The developer copies the js function library link, introduces it into the project, and adds a timestamp; copies the scss variable file of the font package of the download platform, and uses the variable when using the corresponding font in the project or directly adds the style class name for use.

[0098] The present invention realizes the automation, efficient development and fast loading of font package loading. At the same time, when updating, no manual maintenance is required, which reduces the maintenance cost, and can reasonably utilize the advantages of browser cache to quickly load resources. It not only realizes the use of designed fonts to make the website more beautiful, but also accelerates the loading of font packages, optimizes the user experience and the smoothness of interface display.

[0099] The above is a detailed introduction to a method for optimizing font package loading and a font package management system provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

[0100] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for optimizing font package loading, characterized in that: The steps include: S1: Obtain font packages of several fonts from the text library; S2: Sub-packaging the font package according to a set sub-packaging rule to obtain multiple sub-font packages; S3: setting a priority for each of the sub-font packages, and determining a time sequence and a loading method for the sub-font packages according to the priority; S4: naming the sub-packages of the sub-font package according to the priority and the font category, uploading the sub-packages to the cloud server, and obtaining an online link of each sub-font package on the cloud server; S5: setting @font-face rules according to the online path and the corresponding font category, generating a font.css file for guiding the operation of loading the sub-font package from the cloud server, and the sub-font packages of different priorities correspond to different font.css files; S6: The font.css file is uploaded to the OSS platform, and the CSS online link for loading the sub-font package is obtained; S7: According to the css online link, generate the function library code required for the project to load the font.css file and generate the font.js file.

2. The method for optimizing font package loading according to claim 1, characterized in that: The step of determining the time sequence of loading the sub-font packages in S3 includes: setting the priority sequence of the sub-font packages according to the font type and / or the frequency of use of the font text.

3. The method for optimizing font package loading according to claim 1, characterized in that: The loading method in S3 includes: Sub-font packages are loaded step by step: the corresponding sub-font packages are loaded in descending order of priority, and the loading of the next sub-font package starts after the previous sub-font package is loaded; Synchronous loading of sub-font packages: The loading start time of a low-priority sub-font package is earlier than the loading start time of a high-priority sub-font package, so that the loading completion time of the low-priority sub-font package and the high-priority sub-font package is synchronized.

4. The method for optimizing font package loading according to claim 1, characterized in that: The S6 further comprises the following steps: The font.css file is named according to the priority of the sub-font package.

5. The method for optimizing font package loading according to claim 1, characterized in that: The S7 comprises the following steps: S71: Create a link tag using a function library, add an online link of the sub-font package to the href attribute of the link tag, and the link tag points to the location of the font.css file; S72: Create a font.js file for dynamically adding the link tag to the page, thereby loading the font.css file; for multiple sub-font packages, load the multiple sub-font packages according to the loading method.

6. The method for optimizing font package loading according to claim 1, characterized in that: It also includes steps for setting style classes for different fonts: Create a style class for the specified font category, the font-family attribute of the style class contains the sub-package names of all sub-font packages corresponding to the specified font category.

7. A font package management system according to any one of claims 1 to 6 for optimizing font package loading, characterized in that: include: Subcontract rule management module, subcontract management module and code generation module; among which, The sub-packaging rule management module is used to set the constraint conditions and sub-packaging rules of the text library; The sub-packaging management module is used to sub-pack the font package according to the set sub-packaging rules to obtain multiple sub-font packages; set a priority for each sub-font package, and determine the time sequence and loading method of the sub-font package according to the priority; name the sub-package of the sub-font package according to the priority and font category, upload it to the cloud server, and obtain the online link of each sub-font package on the cloud server; The code generation module is used to set the @font-face rule according to the online path and the corresponding font category, generate the font.css file, and guide the operation of loading the sub-font package from the cloud server. The sub-font packages of different priorities correspond to different font.css files; the font.css file is uploaded to the OSS platform to obtain the CSS online link for loading the sub-font package; according to the CSS online link, the function library code required for the project to load the font.css file is generated to generate the font.js file.

8. The font package management system according to claim 7, characterized in that: It also includes a text library management module, including a plurality of text library file modules, for performing editing operations on the text library file modules and / or performing editing operations on the text library data.

9. The font package management system according to claim 7, characterized in that: It also includes a project information management module, which is used to use at least the sub-packaging rule management module, the sub-packaging management module and the code generation module to load the resource files required for the project construction and implement the font package, and perform editing operations on the project.

10. The font package management system according to claim 7, characterized in that: The project information management module is also used to perform the following operations: Determine whether the sub-packaging rule has changed. If so, update the content of the online link of the sub-font package, or update the content of the online link of the sub-font package and the corresponding style class; calculate a hash value based on the online link of the sub-font package and the content of the style class, and use the hash value to name the sub-font package and the style class; add a timestamp to the online link of the font.js file required for loading the generated font package introduced in the project.