fonts.useso.com错误处理

在项目中遇到了一个 GET http://fonts.useso.com/css?family=Open+Sans:300,400,600,700&lang=en 0 () 错误,导致页面加载时间过长,查询后才知 fonts.useso.com 站点更新了,不能用,将 fonts.useso.com 改为 fonts.googleapis.com(用这个域名代替你原来的字体库地址)就可以访问了,大神还提供了另外一种方法,但我没试过:下载下来之后本地引入

下面是需要的资源:

  1. /* cyrillic-ext */
  2. @font-face {
  3. font-family: 'Arimo';
  4. font-style: normal;
  5. font-weight: 400;
  6. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/an78_18DAUCSU6a4qacRuA.woff2) format('woff2');
  7. unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
  8. }
  9. /* cyrillic */
  10. @font-face {
  11. font-family: 'Arimo';
  12. font-style: normal;
  13. font-weight: 400;
  14. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/4NN7UQ_VsRBn7NDD9HKUPw.woff2) format('woff2');
  15. unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  16. }
  17. /* greek-ext */
  18. @font-face {
  19. font-family: 'Arimo';
  20. font-style: normal;
  21. font-weight: 400;
  22. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/ye-fuRt_0mKrPeIp6Mwa8A.woff2) format('woff2');
  23. unicode-range: U+1F00-1FFF;
  24. }
  25. /* greek */
  26. @font-face {
  27. font-family: 'Arimo';
  28. font-style: normal;
  29. font-weight: 400;
  30. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/VF6T-UwCT6WyIiUKP6AykQ.woff2) format('woff2');
  31. unicode-range: U+0370-03FF;
  32. }
  33. /* hebrew */
  34. @font-face {
  35. font-family: 'Arimo';
  36. font-style: normal;
  37. font-weight: 400;
  38. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/X3cUdzInOvbZ6zhcyjPc3w.woff2) format('woff2');
  39. unicode-range: U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F;
  40. }
  41. /* vietnamese */
  42. @font-face {
  43. font-family: 'Arimo';
  44. font-style: normal;
  45. font-weight: 400;
  46. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/eSHy7hCA8QR4qTF-59v60g.woff2) format('woff2');
  47. unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
  48. }
  49. /* latin-ext */
  50. @font-face {
  51. font-family: 'Arimo';
  52. font-style: normal;
  53. font-weight: 400;
  54. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/V41d6938Z8eBLYL302F8Ig.woff2) format('woff2');
  55. unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
  56. }
  57. /* latin */
  58. @font-face {
  59. font-family: 'Arimo';
  60. font-style: normal;
  61. font-weight: 400;
  62. src: local('Arimo'), url(https://fonts.gstatic.com/s/arimo/v9/HNu4Nzh6q8Es60EMNZhs9w.woff2) format('woff2');
  63. unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
  64. }
  65. /* cyrillic-ext */
  66. @font-face {
  67. font-family: 'Arimo';
  68. font-style: normal;
  69. font-weight: 700;
  70. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/ar6XjGD_YvbpY9XD5YxKTBTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  71. unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
  72. }
  73. /* cyrillic */
  74. @font-face {
  75. font-family: 'Arimo';
  76. font-style: normal;
  77. font-weight: 700;
  78. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/XzFO_hPcAZmADxw_2htokBTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  79. unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  80. }
  81. /* greek-ext */
  82. @font-face {
  83. font-family: 'Arimo';
  84. font-style: normal;
  85. font-weight: 700;
  86. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/Tq4Zh2K0uru54pu6hyua9BTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  87. unicode-range: U+1F00-1FFF;
  88. }
  89. /* greek */
  90. @font-face {
  91. font-family: 'Arimo';
  92. font-style: normal;
  93. font-weight: 700;
  94. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/gRIQMcBGUlcKSvTGaO9yHBTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  95. unicode-range: U+0370-03FF;
  96. }
  97. /* hebrew */
  98. @font-face {
  99. font-family: 'Arimo';
  100. font-style: normal;
  101. font-weight: 700;
  102. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/Jg7MGeIJdVGhHqsyezM8VRTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  103. unicode-range: U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F;
  104. }
  105. /* vietnamese */
  106. @font-face {
  107. font-family: 'Arimo';
  108. font-style: normal;
  109. font-weight: 700;
  110. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/u0Tw4Txbkc9Av4uzN1j1aBTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  111. unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
  112. }
  113. /* latin-ext */
  114. @font-face {
  115. font-family: 'Arimo';
  116. font-style: normal;
  117. font-weight: 700;
  118. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/XCmwOdi6K62tkWaszbVGURTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
  119. unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
  120. }
  121. /* latin */
  122. @font-face {
  123. font-family: 'Arimo';
  124. font-style: normal;
  125. font-weight: 700;
  126. src: local('Arimo Bold'), local('Arimo-Bold'), url(https://fonts.gstatic.com/s/arimo/v9/27rE5lMk9EHpLbxiIuGd0PesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
  127. unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
  128. }
  129. /* cyrillic-ext */
  130. @font-face {
  131. font-family: 'Arimo';
  132. font-style: italic;
  133. font-weight: 400;
  134. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/-lqiBwxkYHykb59Lvn7rk_Y6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  135. unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
  136. }
  137. /* cyrillic */
  138. @font-face {
  139. font-family: 'Arimo';
  140. font-style: italic;
  141. font-weight: 400;
  142. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/tvCMF1Qlf0MEvcc7JEzrhfY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  143. unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  144. }
  145. /* greek-ext */
  146. @font-face {
  147. font-family: 'Arimo';
  148. font-style: italic;
  149. font-weight: 400;
  150. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/aKQL0kir7sjNM0_YzHc9yvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  151. unicode-range: U+1F00-1FFF;
  152. }
  153. /* greek */
  154. @font-face {
  155. font-family: 'Arimo';
  156. font-style: italic;
  157. font-weight: 400;
  158. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/c6Ldt38oFMowvdIZIi9CaPY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  159. unicode-range: U+0370-03FF;
  160. }
  161. /* hebrew */
  162. @font-face {
  163. font-family: 'Arimo';
  164. font-style: italic;
  165. font-weight: 400;
  166. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/awI6zBWVPE21rQLtkVDZpfY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  167. unicode-range: U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F;
  168. }
  169. /* vietnamese */
  170. @font-face {
  171. font-family: 'Arimo';
  172. font-style: italic;
  173. font-weight: 400;
  174. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/Phj51JGRBuPcxq7i7-qcHPY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  175. unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
  176. }
  177. /* latin-ext */
  178. @font-face {
  179. font-family: 'Arimo';
  180. font-style: italic;
  181. font-weight: 400;
  182. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/-CSRdP_Aes2aBSIDGwIm6vY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
  183. unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
  184. }
  185. /* latin */
  186. @font-face {
  187. font-family: 'Arimo';
  188. font-style: italic;
  189. font-weight: 400;
  190. src: local('Arimo Italic'), local('Arimo-Italic'), url(https://fonts.gstatic.com/s/arimo/v9/GYkAnzJvKnl5kOgLY6RO-w.woff2) format('woff2');
  191. unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
  192. }

可以复制上面的代码,然后保存为.css文件

一键分享 Share

评论

换原始留言系统