【问题标题】:Firefox - Google fonts, greek won't work with RobotoFirefox - 谷歌字体,希腊语不适用于 Roboto
【发布时间】:2015-05-05 17:10:36
【问题描述】:
你可以检查下面的sn-p,问题是Roboto在firefox上不能正确显示希腊字符。
body {
font-family: Roboto, sans-serif;
}
<link href="http://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
<h1>This is a test</h1>
<h1>Αυτό είναι ένα τεστ</h1>
【问题讨论】:
标签:
css
html
firefox
google-font-api
roboto
【解决方案1】:
您似乎需要将正确的子集添加到字体 API 调用中。尝试改用这个
http://fonts.googleapis.com/css?family=Roboto&subset=latin,greek-ext,greek
这在 Firefox 中似乎对我有用。
【解决方案2】:
您需要添加子集“希腊语”(我也添加了希腊语扩展以防万一)
body {
font-family: Roboto, sans-serif;
}
<link href='http://fonts.googleapis.com/css?family=Roboto&subset=latin,greek-ext,greek' rel='stylesheet' type='text/css'>
<h1>This is a test</h1>
<h1>Αυτό είναι ένα τεστ</h1>
附注- 你怎么能自动做到这一点?
在第 2 步中here