【发布时间】:2018-10-25 15:33:10
【问题描述】:
我想使用谷歌字体中没有的“Antonio 字体”。我收到了一个 .ttf 文件并按照下面的说明使用它,是否足够或我需要其他文件(woff、woff2 等)?
@font-face {
font-family: Antonio;
src: url(../../../../public/assets/fonts/Antonio-Regular.ttf) format('truetype');
}
.obj{
font-family: Antonio, serif;
}
【问题讨论】:
-
没有。事实上,根本不要使用
ttf。见Are eot, ttf, and svg still necessary in the font-face declaration?