是否可以在 google 字体 api 中指定字体版本?
Is it possible to specify a font version in the google fonts api?
我们使用的 Google 字体 (Pacifico) 最近对首都 'L' 进行了相当彻底的重新设计。当我们将它用于我们的产品时,其名称以 'L' 开头,这导致我们产品的外观发生了相当大的变化。
深入研究,我注意到字体的 url 已从
更改
fonts.gstatic.com/s/pacifico/v7/Q_Z9mv4hySLTMoMjnk_rCXYhjbSpvc47ee6xR_80Hnw.woff2
到
fonts.gstatic.com/s/pacifico/v8/Q_Z9mv4hySLTMoMjnk_rCXYhjbSpvc47ee6xR_80Hnw.woff2
但是之前的 v7 urls 仍然有效。所以,现在,我已经添加了对该版本的硬编码字体引用。
不过,是否可以将 link 改为特定版本的字体?
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
所以,不知何故在上面指定一个版本link?
我试过各种猜测,比如:
https://fonts.googleapis.com/css?family=Pacifico&version=7
https://fonts.googleapis.com/css?family=Pacifico&version=v7
https://fonts.googleapis.com/css?family=Pacifico:v7
但无济于事。
坚持使用特定版本的推荐方法是自行托管。
Google 没有也不会有版本控制选项。
官方不推荐您使用的 API v7
hack,并且可能会损坏。
Google Fonts 员工“davelab6”已经在 Google Fonts github 上回答了几个类似您的问题。 This question is much like yours and has a brief answer from him. It also links to several other issues 与 热烈讨论 类似的变化。
结果是 Google 考虑过提供版本控制功能,但出于多种原因拒绝了它。他们说绝大多数用户都可以使用最新版本的字体,其余的可以自行托管他们喜欢的版本。
至于如何自托管,我无法理解,但是a question about it here with several answers。
我们使用的 Google 字体 (Pacifico) 最近对首都 'L' 进行了相当彻底的重新设计。当我们将它用于我们的产品时,其名称以 'L' 开头,这导致我们产品的外观发生了相当大的变化。
深入研究,我注意到字体的 url 已从
更改fonts.gstatic.com/s/pacifico/v7/Q_Z9mv4hySLTMoMjnk_rCXYhjbSpvc47ee6xR_80Hnw.woff2
到
fonts.gstatic.com/s/pacifico/v8/Q_Z9mv4hySLTMoMjnk_rCXYhjbSpvc47ee6xR_80Hnw.woff2
但是之前的 v7 urls 仍然有效。所以,现在,我已经添加了对该版本的硬编码字体引用。
不过,是否可以将 link 改为特定版本的字体?
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
所以,不知何故在上面指定一个版本link?
我试过各种猜测,比如:
https://fonts.googleapis.com/css?family=Pacifico&version=7
https://fonts.googleapis.com/css?family=Pacifico&version=v7
https://fonts.googleapis.com/css?family=Pacifico:v7
但无济于事。
坚持使用特定版本的推荐方法是自行托管。
Google 没有也不会有版本控制选项。
官方不推荐您使用的 API v7
hack,并且可能会损坏。
Google Fonts 员工“davelab6”已经在 Google Fonts github 上回答了几个类似您的问题。 This question is much like yours and has a brief answer from him. It also links to several other issues 与 热烈讨论 类似的变化。
结果是 Google 考虑过提供版本控制功能,但出于多种原因拒绝了它。他们说绝大多数用户都可以使用最新版本的字体,其余的可以自行托管他们喜欢的版本。
至于如何自托管,我无法理解,但是a question about it here with several answers。