css3 font-spider壓縮自定義字型的方法
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>微信授權</title>
<style type="text/css">
.ew {
font-family: myFirstFont;
}
@font-face {
font-family: myFirstFont;
src: url('ziti/zhanku2.ttf')
}
</style>
</head>
<body>
<div class="ew">自定義字型</div>
</body>
</script>
</html>
所有路徑都必須相對路徑
安裝下 font-spider 執行以下指令
font-spider G:/phpStudy/WWW/mircoweb/mircoweb/wwwroot/Public/index22.html
壓縮完會覆寫原來的字型檔案
如果需要動态壓縮字型
那就是每次送出字型 需要重新 font-spider 重新更新引用的字型檔案