问题描述
我使用fontsquirrel生成器为Thonburi和Thonburi粗体字体生成字体内容。他们用英语显示很好,但不是以西里尔语(俄语)显示。相反,该网站显示Times New Roman作为默认的回退字体。我使用高级设置在字体文件中特别包含西里尔文字符。请检查: b $ b您甚至可以看到在吞武里显示的拉丁字符,而俄罗斯是TNR。英文版显示正常:
你有什么想法是什么可能是这个问题的根源,以及如何解决这个问题?
它在家里显示得很好,但我有在Windows上安装的字体。每当我在另一台电脑上第一次打开网站时,RU版本将获得Times New Roman字体,而不是Thonburi。
在页面上指定的Thonburi和Thonburi Bold字体没有西里尔字母(我使用OTMaster Light检查过)。这就解释了为什么西里尔字母会使用后备字体来显示,默认情况下是Times New Roman。
要使用,这是封闭的太本地化。所以我已经复制了我的答案和一个额外的评论。
P.S.2。它在你家里工作的原因是CSS代码包含 src:local(Thonburi),url(fonts / thonburi-webfont.ttf)
到本地安装的字体,显然也包含西里尔字母。
I used fontsquirrel generator to generate font-face contents for Thonburi and Thonburi bold fonts. They display fine in English, but not in Cyrillic (Russian). Instead the site displays Times New Roman as default fallback font. I used advanced settings to specifically include cyrillic characters in font files. Kindly check: http://www.mastersofbackgammon.net/site/index_ru.htmlYou can even see that Latin characters are displayed in Thonburi, while Russian is TNR.
It displays fine in English version:http://www.mastersofbackgammon.net/site
Do you have any ideas what could be the root of this problem and how to resolve this?
It displays fine at home, but there I have the fonts installed on Windows. Whenever I open site for the first time on another computer, the RU version gets the Times New Roman font and not Thonburi.
The Thonburi and Thonburi Bold font as specified on the page have no Cyrillic letters (I checked this using OTMaster Light). This explains why Cyrillic letters are displayed using a fallback font, which is typically Times New Roman by default.
To generate adequate font files using the FontSquirrel generator, select "EXPERT..." and then in "Subsetting", select either "Custom Subsetting" and required languages or "No Subsetting". The default there in "Basic Subsetting", which includes "Western languages" only!
P.S. The question was first asked as Font not displaying correctly in cyrillic on some occasions, which was closed as "too localized". So I have copied my answer and an added comment.
P.S.2. The reason why it works for you at home is that the CSS code contains src: local(Thonburi), url("fonts/thonburi-webfont.ttf")
, giving preference to a locally installed font, which apparently contains Cyrillic letters too.
这篇关于用font-face显示自定义西里尔字体的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!