一种字体文件加载方法、装置、电子设备及存储介质
By converting source code files into an abstract syntax tree to extract static text and generate static font files, the inefficiency of the WordSpider solution is solved, enabling fast display of static and dynamic text and improving front-end performance.
CN115221437BActive Publication Date: 2026-07-17NETEASE (HANGZHOU) NETWORK CO LTD
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2022-07-01
- Publication Date
- 2026-07-17
AI Technical Summary
Technical Problem
Existing font spider solutions are inefficient in reducing font package size, involve complex manual operations, cannot support dynamic text display, and have limited applicability.
Method used
By converting the source code files of the target website into an abstract syntax tree, static text is extracted to generate static font files, which are then loaded during the initial browser runtime. Dynamic font files are loaded during the second runtime, enabling fast display of both static and dynamic text.
Benefits of technology
It improves font file loading efficiency, supports fast display of static and dynamic text, has a wide range of applications, and enhances front-end performance optimization.
✦ Generated by Eureka AI based on patent content.
Smart Images

Figure CN115221437B_ABST
Abstract
本申请提供一种字体文件加载方法、装置、电子设备和计算机可读存储介质,在该方法中先获取目标网站的源码文件和预设字体文件,将源码文件转换为抽象语法树,从抽象语法树的目标节点中提取静态文本,处理静态文本得到第一字符集,然后根据第一字符集和预设字体文件生成静态字体文件和动态字体文件,最后在浏览器的初始运行时间段加载静态字体文件和目标网站,在浏览器的第二运行时间段加载动态字体文件和目标网站,第二运行时间段在初始运行时间段之后。本申请提升了静态文本提取效率和提取完整度,且在不堵塞网站加载的同时实现了动态文本的个性化显示,即,本申请的字体文件加载方法适用场景较为广泛,在前端性能优化方面具有较大的优势。
Need to check novelty before this filing date? Find Prior Art