打开Transfonter网站,上传字体(理论其它文件格式也可以转换,并未尝试),选择base64编码,convert后下载
下载得到的包中有style文件,打开后获得以下代码,并对照中的内容,加入到微信小程序的文件中 @font-face { font-family: 'fa';src: url(data:font/truetype;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTXLOMIUAAlXMAAAAHEdERUYAJwKrAAJVrAAAAB5PUy8yiDJ6IwAAAVgAAABgY21hcJ0vdNQAAAw4AAADAmdhc3D//wADAAJVpAAAAAhnbHlmHejPwQAAGdQAAh3kaGVhZAbB4eAAAADcAAAANmhoZWEO+QqbAAAB......long long)format('truetype');font-weight: normal;font-style: normal;}.fa {
font-family: "fa"!important;font-size: 16px;
-webkit-font-smoothing: antialiased;-webkit-text-stroke-width: ;}
/* makes the font 33% larger relative to the icon container */.fa-lg {
font-size: ;line-height: ;vertical-align:-15%;}.fa-2x { font-size: 2em;}
//long long long.然后在小程序中使用cla="fa fa-user"即可,如