限制Webfont的字符集? [英] Limit characterset of a Webfont?

查看:147
本文介绍了限制Webfont的字符集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以限制嵌入式Webfont的字符集吗?

I wonder if it is possible to limit the characterset of an embedded webfont?

例如"Typekit"在其"Kit Editor"中具有一个选项,您可以在其中选择All CharactersDefault.

E.g. "Typekit" has an option in its "Kit Editor" where you can choose between All Characters or Default.

但是,在我的情况下,我不使用Typekit,而是使用普通的嵌入式Webfont.由于大量字符,字体文件相当大.

However in my case I don't use Typekit but a normal embedded webfont. The fontfiles are rather big due to the large amounts of characters.

@ font-face调用是否存在一些元标记"或属性",以将字符集限制为"Latin-1"?

Is there some "meta-tag" or "attribute" for the @font-face call to limit the charcterset to let's say "Latin-1"?

预先感谢您, 马特

推荐答案

@font-face只是告诉浏览器使用您提供的字体定义文件,然后它将下载整个内容.如果字体文件太大(因为它们包含实际上不使用的字形),则需要通过删除(或不包括)字形来减小定义文件的大小.我使用的网络字体创建软件可让您指定要包含的字符.

@font-face simply tells the browser to use the font definition file(s) you provide, and it will download the whole thing. If the font file(s) are too big because they contain glyphs you don't actually use, you need to reduce the size of the definition files by removing (or rather, not including) glyphs. The web-font creation software I've used allows you to specify which characters are to be included.

即使有一种方法可以告诉浏览器仅使用Latin-1",它仍必须下载整个文件才能丢弃其中的一部分.

Even if there were a way to tell the browser "Only use Latin-1" it would still have to download the whole file in order to throw part of it away.

[请注意,如果您随后调用一个已省略的字形,则用户将看到一个正方形或钻石中的问号.去过那里,做到了!]

[Note that if you subsequently call for a glyph you have omitted, your users will see a square, or question-mark-in-a-diamond. Been there, done that!]

这篇关于限制Webfont的字符集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆