安装AI (Adobe Illustrator)
安装FontLab Studio 5.5
在AI中新建文件 画矢量图 然后复制内容
在FontLab中新建字体,点击任意字符, 比如点击了大写A 和 大写B, 将猫粘贴在A字符上, 狗粘贴在B字符上。 这样,AB 字符瞬间就变身为喵星人和汪星人了。
FontLab中生成字体 emi.ttf
Goto https://www.fontsquirrel.com/tools/webfont-generator 网速很慢耐心等待。
上传emi.ttf, 下载生成的字体包, 最好在设置里多勾选集中字体
- 下载压缩包解压长这个样子
- 打开 -demo.html 文件,就可以看到自己画得字体啦 ^_^
- 打开css文件,@font-face已经写好了,是不是很棒呢!
- 将字体文件(.eot, .svg, .ttf, .woff, .woff2)复制到项目文件夹
- 新建html文件,写入代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>emi font</title>
</head>
<style>
@font-face {
font-family: 'emi';
src: url('emi-webfont.eot');
src: url('emi-webfont.eot?#iefix') format('embedded-opentype'),
url('emi-webfont.woff2') format('woff2'),
url('emi-webfont.woff') format('woff'),
url('emi-webfont.ttf') format('truetype'),
url('emi-webfont.svg#untitledregular') format('svg');
font-weight: normal;
font-style: normal;
}
body {
font-family: "emi";
font-size: 100px;
}
</style>
<body>
AB
</body>
</html>
- 刷新浏览器, you will see —– SURPRISE!!!
- 当然你也可以通过font-size 和 color 来写很多的AB,就像操作字体一样简单, like this: