gpt4 book ai didi

css - 使用 Google Web Fonts 获取不同的图形类型

转载 作者:技术小花猫 更新时间:2023-10-29 11:05:47 25 4
gpt4 key购买 nike

根据 this page :

[Raleway] is a display face and the download features both old style and lining numerals, standard and discretionary ligatures, a pretty complete set of diacritics, as well as a stylistic alternate inspired by more geometric sans-serif typefaces than its neo-grotesque inspired default character set.

(强调我的)

数字的默认值是“旧式”(“onum” OpenType feature string ),在标题中使用时看起来很糟糕。理想情况下,我希望能够使用“内衬”变体(“lnum”)和“表格”(“tnum”)字距调整(与比例 - “pnum”相反)。

我试过使用以下 font-feature-settings block 声明,无济于事:

font-feature-settings: "onum" off, "pnum" off, "lnum" on, "tnum" on;
-moz-font-feature-settings: "onum=0, pnum=0, lnum=1, tnum=1"; /* Firefox */
-webkit-font-feature-settings: "onum" off, "pnum" off, "lnum" on, "tnum" on; /* WebKit */
-o-font-feature-settings: "onum" off, "pnum" off, "lnum" on, "tnum" on; /* Opera */

有什么想法吗?如果我想下载完整的字体,然后将其重新导出为网络字体,我该怎么做才能确保获得衬里数字?

谢谢!

最佳答案

从这个页面:http://clagnut.com/sandbox/css3/

.lnum {
font-variant-numeric: lining-nums;
-moz-font-feature-settings:"lnum" 1;
-moz-font-feature-settings:"lnum=1";
-ms-font-feature-settings:"lnum" 1;
-o-font-feature-settings:"lnum" 1;
-webkit-font-feature-settings:"lnum" 1;
font-feature-settings:"lnum" 1;
}

目前仅适用于 .otf 文件,不适用于由 google webfonts 托管的字体嵌入。在 Safari 中不受支持。您可以在此处测试其他字体功能和浏览器支持:https://www.typotheque.com/articles/opentype_features_in_web_browsers_-_tests

关于css - 使用 Google Web Fonts 获取不同的图形类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17218891/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com