Google Fonts 中无法访问的字形和符号 [英] Inaccessible glyphs and symbols in Google Fonts

查看:26
本文介绍了Google Fonts 中无法访问的字形和符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google 字体样本表上显示的某些字形在网站上实施后将不再可用.

Some glyphs that are shown on the Google Fonts specimen sheet are not available once the font is implemented on a site.

例如,看看 Piazzolla 的这个预览:

For example, look at this preview for Piazzolla:

然后,将其与使用相同字体但箭头不同的 codepen 进行比较不使用相同的字形.

Notice how the arrows are using the custom glyph provided by the font.

(随机代码块以安抚stackoverflow,因为问题中没有需要嵌入的代码.)

(random code block to appease stackoverflow because there is no code that needs to be embedded in the question.)

这让我相信 Google 没有提供整个字体,并且可能有办法访问更多字符.

This leads me to believe that Google is not serving up the entire font, and there might be a way to have access to more characters.

任何帮助将不胜感激.谢谢!

Any help would be greatly appreciated. Thanks!

推荐答案

GF API 对此有一个高级功能,但您必须仔细阅读手册 (https://developers.google.com/fonts/docs/getting_started) 并知道如何使用 API 来做您想做的事.

The GF API has an advanced feature for this, but you have to closely read the manual (https://developers.google.com/fonts/docs/getting_started) and know how to use the API to do what you want.

这是一个在 IBM Plex 中使用箭头的工作演示:

Here's a working demo using the arrows in IBM Plex:

https://jsbin.com/neheyuxira/2/edit?html,output

应用相同技术的页面分支

And a fork of your page with the same technique applied

https://codepen.io/davelab6/pen/bGRpJQP

诀窍是首先添加一个 API URL,该 URL 使用 text API 功能来指定所需的 unicode(URL 编码,例如使用 https://r12a.github.io/app-encodings),然后是常规 API URL.

The trick is to add a API URL first that uses the text API feature to specify the unicodes you want (URL encoded, eg with https://r12a.github.io/app-encodings), and then the regular API URL.

<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed|IBM+Plex+Serif&text=%E2%86%B3" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed|IBM+Plex+Serif" rel="stylesheet">

这篇关于Google Fonts 中无法访问的字形和符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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