当前位置:网站首页>The use of font compression artifact font-spider
The use of font compression artifact font-spider
2022-07-31 02:40:00 【Hao Xing】
Foreword:
Many times the project will encounter the need to introduce external fonts, whether it is vue, applet, react, etc., but the pc-side project is fine, it is possible to put the source files locally, but the applet will not work, because the bodyThe amount is relatively small, and there is a limit to the size.
font-spider word spider official website address: it is best to have over the wall software, otherwise it is too slow, and there is a high probability of failure
font-spider.org - http://ww1.font-spider.org/
Specific use:
1. Install the plugin globally
npm install font-spider -g
2. Check if the installation is successful
font-spider -V
3. Open your directory and find the folder where your source files are located, such as mine
4. Create a new index.html,
Note that names such as LouisVuittonGlobal-Regular are replaced with your own source files
font spider abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
5. Right-click to open the cmd pop-up box, or the powershell pop-up box, and execute the command
font-spider index.html
6. You can see the following interface, the source file is 2M, and it is about 60k after compression. There are other formats that can be used
7. Beautiful, use it, import css:
@font-face {font-family: 'LouisVuittonGlobal-Regular';src: url("../fonts/LouisVuittonGlobal-Regular.ttf") format('truetype'); //mainly this sentencefont-weight: normal;font-style: normal;}
边栏推荐
猜你喜欢
【Android】Room —— SQLite的替代品
8、统一处理异常(控制器通知@ControllerAdvice全局配置类、@ExceptionHandler统一处理异常)
系统需求多变如何设计
Discourse 自定义头部链接(Custom Header Links)
The principle of complete replication of virtual machines (cloud computing)
图解lower_bound&upper_bound
二层广播风暴(产生原因+判断+解决)
STM32CUBEMX develops GD32F303 (11) ---- ADC scans multiple channels in DMA mode
分布式与集群是什么 ? 区别是什么?
What level of software testing does it take to get a 9K job?
随机推荐
YOLOV5学习笔记(三)——网络模块详解
[1154] How to convert string to datetime
mycat的主从关系 垂直分库 水平分表 以及mycat分片联表查询的配置详解(mysql5.7系列)
Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
StringJoiner in detail
SQL注入 Less46(order by后的注入+rand()布尔盲注)
16. Registration Center-consul
print task sorting js od huawei
什么是分布式锁?实现分布式锁的三种方式
7、私信列表
8. Unified exception handling (controller notifies @ControllerAdvice global configuration class, @ExceptionHandler handles exceptions uniformly)
STM32CUBEMX develops GD32F303 (11) ---- ADC scans multiple channels in DMA mode
Multilingual settings of php website (IP address distinguishes domestic and foreign)
Drools Rule Properties, Advanced Syntax
Brute Force/Adjacency Matrix Breadth First Directed Weighted Graph Undirected Weighted Graph
Coldfusion file read holes (CVE - 2010-2861)
ShardingJDBC usage summary
221. Largest Square
Software testing basic interface testing - getting started with Jmeter, you should pay attention to these things
STP选举(步骤+案列)详解