Questions tagged [google-font-api]

The Google Font Directory provides high-quality web fonts that you can include in your pages using the Google Font API.

Benefits of the Google Font API include:

  • A choice of high quality open source fonts.
  • Works in most browsers.
  • Extremely easy to use.

Available at https://developers.google.com/fonts/

541 questions
292
votes
13 answers

How to host google web fonts on my own server?

I need to use some google fonts on an intranet application. The clients may or may not have internet connection. Reading the license terms, it appears that its legally allowed.
Samarth Bhargava
  • 4,196
  • 3
  • 17
  • 16
213
votes
18 answers

How to use Google fonts in React.js?

I had built a website with React.js and webpack. I want to use Google fonts in the webpage, so I put the link in the section. Google Fonts And set CSS body{ …
Kevin Hsiao
  • 2,281
  • 2
  • 10
  • 18
197
votes
5 answers

Google fonts URL break HTML5 Validation on w3.org

I load 3 fonts in different sizes using this HTML tag: Till ~1/2 weeks ago this was…
Octavian
  • 4,519
  • 8
  • 28
  • 39
84
votes
4 answers

How can I download WOFF files from Google Fonts?

Google Fonts seems to only offer fonts in WOFF2. While this works fine with Chrome, WOFF2 doesn't seem to be supported by many other browsers Is there a way to directly link to Google fonts hosted on their CDN in a format other than WOFF2?
cantsay
  • 1,967
  • 3
  • 21
  • 34
72
votes
10 answers

Google Web Fonts and PDF generation from HTML with wkhtmltopdf

I am using wkhtmltopdf to convert HTML files in PDF format; it gives surprisingly good results, rendering the PDF exactly as WebKit would do. I am using Google Web Fonts to give users the possibility to customize the appearence of the document they…
Mathieu Rodic
  • 6,637
  • 2
  • 43
  • 49
69
votes
6 answers

Google Fonts violates Content Security Policy

I'm trying to use Google Fonts and I've never had any problems, but now when I try to add the CSS file on my header I get this error on the console: Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=Whatever' because it…
José María
  • 2,835
  • 5
  • 27
  • 42
63
votes
2 answers

How to use font-family lato?

How to use font-family lato ? I have used style like this but not working . How can I do ? Thank you. font-family: Lato, Helvetica, sans-serif; link: http://www.google.com/fonts/specimen/Lato
user3274579
  • 643
  • 1
  • 5
  • 4
49
votes
7 answers

Load Google Font with asynchronously or deferred without Font Face Observer

I want to use the Google Font "Noto Serif" for my website. My problem is that when I am testing it with Google PageSpeed Insights, it says everything is perfect except for one thing:
oatmealNUGGY
  • 775
  • 1
  • 6
  • 22
48
votes
7 answers

How do I 'leverage browser caching' for Google fonts?

I tested my site via Pingdom and got this: I searched but couldn't find a solution to this. Does anyone know how I can get this 14 to 100?
J82
  • 8,267
  • 23
  • 58
  • 87
36
votes
4 answers

How to turn off local fonts to test google fonts?

Prior art: Can I disable my local font in chrome? https://superuser.com/questions/292666/how-to-disable-permission-to-read-system-fonts-and-browser-plugin-details-in Is there a way to disable system fonts temporarily in any browser? The only…
AJcodez
  • 31,780
  • 20
  • 84
  • 118
33
votes
11 answers

Google Font not working on Safari

I'm working on making my site look the same under Safari and Chrome. In Chrome it looks exactly how I want it to. The major problem is that Google Font doesn't seem to be loading under Safari. Because I'm using the exact code given on the Google…
Juicy
  • 11,840
  • 35
  • 123
  • 212
30
votes
2 answers

How can I only use Latin subset with Google Fonts WOFF2 files?

I wanted to add a font with Google Fonts, and I have noticed an odd behavior. I want to add a font with only the latin subset, I do not want latin-ext, cyrillic or cyrillic-ext subset, in order to lighten the code. I understand that's the default…
webdif
  • 6,341
  • 3
  • 18
  • 15
29
votes
3 answers

Dynamically load google fonts after page has loaded

I would like to be able to have the user select which font they would like the page to be displayed in. Here is the way that Google recommends you do it using JavaScript. WebFontConfig = { google: { families: ['Tangerine',…
Alexis
  • 23,545
  • 19
  • 104
  • 143
24
votes
4 answers

CSS: Disable font ligatures in all browsers

As google fonts are blocked in China I had to download them and use FontSquirrel for conversion. The problem: fi/ff/etc are ugly I did all of the steps here Prevent ligatures in Safari (Mavericks/iOS7) via CSS but no cigar. How can I disable…
pachadotdev
  • 3,345
  • 6
  • 33
  • 60
24
votes
2 answers

Use a google font and include only [A-Z] and '&'

Is there a way to use a google font and have it load only [A-Z] and the & ampersand character? I would like to do this to reduce size and improve load time, since I will only use basic latin numbers and letters. I can host the font myself if I must…
SimplGy
  • 20,079
  • 15
  • 107
  • 144
1
2 3
36 37