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

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');

	}

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值