自定义web字体-通过@font-face在页面中嵌入 .woff格式字体的引用

版权声明:https://blog.csdn.net/lovexiuwei https://blog.csdn.net/lovexiuwei/article/details/83623837
font = TTFont('xxx.woff')    # 打开文件
font.saveXML('xxx/6329.xml')
font['cmap'] 映射关系unicode跟Name
ffont['glyf'][name].coordinates 字形的轮廓信息
  • 在html5中嵌入字体  .woff格式的引用
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"></meta>
    <title>测试</title>
    <link rel="stylesheet" href="css/myWebFont.css"></link>
</head>
<body>
<div class="col-sm-12">
    <div class="row list-icon">
        <div class="col-md-3">
            <i class="ui-icon mf mf-folderadd"></i>mf-folderadd
        </div>
    </div>
</div>
</body>
<html>
  • .woff的引用​​​​​​​ 
@font-face {
	font-family: 'woff-文件名';
	font-style: normal;
	font-weight: 400;
	src: url(css/Monoton.woff2) format('woff2'),  //引入文件路径
             url('mywebfont.eot?#iefix') format('embedded-opentype'),
             url('mywebfont.woff2') format('woff2'),
             url('mywebfont.woff') format('woff'),
             url('mywebfont.ttf') format('truetype'),
             url('mywebfont.svg#mywebfontregular') format('svg');

	}

  

猜你喜欢

转载自blog.csdn.net/lovexiuwei/article/details/83623837