First, install the Font-spider
NPM Install Font-spider-g
II. directory Structure
Font-spider
Font
Fzzzhonghjw.ttf
Font.html
Iii. contents of font.html
<! DOCTYPE html>
<title> Founder Center Black Simplified </title>
<meta charset= "Utf-8" >
<style type= "Text/css" >
@font-face {
font-family: ' FZZZHONGHJW ';
Src:
URL (' Font/fzzzhonghjw.eot #font-spider ') format (' Embedded-opentype '),
URL (' font/fzzzhonghjw.woff ') format (' Woff '),
URL (' Font/fzzzhonghjw.ttf ') format (' TrueType '),
URL (' font/fzzzhonghjw.svg ') format (' SVG ');
}
p{
font-family: "FZZZHONGHJW";
}
</style>
<body>
<!--Global--
<p> class situation arrangement work teaching resources </p>
</body>
Four, from the font file to crawl the page font, generate font files, execute the command:
Font-spider font.html
V. Post-BUILD directory structure
Font-spider
Font
. font-spider
Fzzzhonghjw.ttf
Fzzzhonghjw.eot
Fzzzhonghjw.svg
Fzzzhonghjw.ttf
Fzzzhonghjw.woff
Font.html
Use the spider to remove the required characters and apply the font