choffmeister / roboto-fontface-bower

Bower package for the Roboto font-face
Apache License 2.0
153 stars 57 forks source link

Add font-display: auto; #58

Closed tracker1 closed 5 years ago

tracker1 commented 5 years ago

Add font-display: auto; to the css files, so that the browser will display a fallback font while loading.

jschroeter commented 5 years ago

According to MDN, auto is the default value, so it doesn't need to be set?

tracker1 commented 5 years ago

I'm getting errors via the Audits on chrome's developer tools related to this. (and the text is not visible until the actual font loads, where it would be good to see a fallback font here).

choffmeister commented 5 years ago

@tracker1 Sorry for the long delay, I am not really working on this repo anymore.

I would not want to add this to the CSS of this font package. The decision should be up to the user of this package. So if you want a specific font-display, you should just set it in your custom CSS.

Side note: You chrome audit warning should not go away with font-display: auto, because as @jschroeter pointed out this is the default anyway. Using font-display: fallback should help though.