当前位置:网站首页>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;}
边栏推荐
- Uninstallation of mysql5.7.37 under CentOS7 [perfect solution]
- How to do a startup CTO?
- 图解lower_bound&upper_bound
- try-catch中含return
- Introduction and use of Drools WorkBench
- 6、显示评论和回复
- 二层广播风暴(产生原因+判断+解决)
- [1154] How to convert string to datetime
- Maximum area of solar panel od js
- Hanyuan Hi-Tech 8-channel HDMI integrated multi-service high-definition video optical transceiver 8-channel HDMI video + 8-channel two-way audio + 8-channel 485 data + 8-channel E1 + 32-channel teleph
猜你喜欢
什么是分布式锁?实现分布式锁的三种方式
直播预告 | KDD2022博士论文奖冠亚军对话
Introduction to flask series 】 【 flask - using SQLAlchemy
二层广播风暴(产生原因+判断+解决)
编译Hudi
11、Redis实现关注、取消关注以及关注和粉丝列表
Problems that need to be solved by the tcp framework
Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
19.支持向量机-优化目标和大间距直观理解
The effective square of the test (one question of the day 7/29)
随机推荐
What level of software testing does it take to get a 9K job?
Linux下redis7的安装,启动与停止
Software testing basic interface testing - getting started with Jmeter, you should pay attention to these things
如何搭建私有yum源
Clustering index, and what is the difference between a clustering index
Project development software directory structure specification
The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]
The simulation application of common mode inductance is here, full of dry goods for everyone
15. Website Statistics
开题报告之论文框架
LeetCode 1161 最大层内元素和[BFS 二叉树] HERODING的LeetCode之路
【C语言基础】解决C语言error: expected ‘;‘, ‘,‘ or ‘)‘ before ‘&‘ token
Live Preview | KDD2022 Doctoral Dissertation Award Champion and Runner-up Dialogue
execsnoop 工具
Pythagorean tuple od js
【Bank Series Phase 1】People's Bank of China
SQL注入 Less46(order by后的注入+rand()布尔盲注)
mmdetection训练一个模型相关命令
系统需求多变如何设计
How to build a private yum source