合并 TTF 字体文件(用于 CSS)
也许有人这样做了:
我有每个样式的一种字体的多个文件(常规、粗体、斜体、斜体粗体) 斜体字体.ttf 粗体字体.ttf font-regular.ttf
如何将其合并到一个文件,以便在 CSS 中的一种字体中使用?
Maybe somebody did do this:
I have several files for one font for each style (regular,bold, italic, italc-bold)
font-italic.ttf
font-bold.ttf
font-regular.ttf
How can I merge it to one file, to use in one font-face in CSS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。单个字体文件描述了用于特定样式的特定字体的字形。
虽然您可以将它们合并并使用样式集来引用不同的字体,但在 CSS 中却无法做到这一点(大多数其他应用程序也无法做到)。除此之外(以及阿拉伯语等),(据我所知)没有直接的方法可以在字体文件中为相同的代码点使用不同的字形。
You cannot. A single font file describes the glyphs used for a particular font in a particular style.
While you could probably merge them and use Stylistic Sets to refer to the different fonts that is something you cannot do in CSS (and most other applications neither). Apart from that (and things like Arabic) there is (as far as I know) no straightforward way to have different glyphs for the same code points in a font file.