简体   繁体   English

如何通过单词引用iconfont中的字形?

[英]How to reference an glyph in iconfont by word?

I want to use iconfont in my project,and custom the font file by fontforge. 我想在项目中使用iconfont,并通过fontforge自定义字体文件。

I know glyph can be referenced by unicode in html or css, such as <i>&#xe030;</i> and &::before{content: "\\e030";} .While I find some people can reference glyph by this: <i>library_music</i> .I guess that's glyph name, but I cant find the 'library_music' definition in fontforge. 我知道字形可以由html或css中的unicode引用,例如<i>&#xe030;</i>&::before{content: "\\e030";} 。虽然我发现有些人可以通过以下方式引用字形这样的: <i>library_music</i>我想这是字形的名字,但我不能找到在fontforge的'library_music'的定义。

Here is my html and css code. 这是我的HTML和CSS代码。

 @font-face { font-family: 'testfont'; src: url(https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2'); } i { font-family: "testfont"; } 
 <i>library_music</i> <i>&#xe030;</i> 

I hope some one can tell me what is the principle of 'library_music' reference and how can I custom the word in fontforge. 我希望有人能告诉我“ library_music”引用的原理是什么,以及如何在fontforge中自定义单词。

thx a lot. 多谢。

As in material guide doc: 材料指南文档中所述:

在此处输入图片说明

here is explain 这是解释

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM