使用Google网络字体获取不同的图形类型 [英] Getting different figure types with Google Web Fonts

查看:138
本文介绍了使用Google网络字体获取不同的图形类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此网页


[Raleway]是显示面,下载功能同时包含旧样式
衬线数字连字,一个漂亮的
完整的变音符号,以及一个风格的替代灵感的
更多的几何无衬线字体比其新奇怪的启发
默认字符集。

[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功能字符串),看起来很可怕用于标题。理想情况下,我想能够使用衬里变体(lnum),与表格(tnum)kerning(而不是比例 - pnum)。

The default for numerals is "old style" ("onum" OpenType feature string), which look pretty awful when used in headlines. Ideally, I'd like to be able to use the "lining" variant ("lnum"), with "tabular" ("tnum") kerning (As opposed to proportional -- "pnum").

我已尝试使用以下块 font-feature-settings 声明,无效:

I've tried using the following block of font-feature-settings declarations, to no avail:

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 */

任何想法?如果我想下载完整的字体,然后重新导出为网络字体,我该怎么做,同时确保我得到衬里的数字?

Any thoughts? If I wanted to download the full font and then re-export it as a web-font, how would I do so while ensuring I get the lining figures?

谢谢!

推荐答案

从此网页: 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

Only works with .otf files for now, not with font embeds hosted by google webfonts. Not supported in Safari. You can test other typeface features and browser support here: https://www.typotheque.com/articles/opentype_features_in_web_browsers_-_tests

这篇关于使用Google网络字体获取不同的图形类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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