Search code examples
cssfirefoxfont-facewebfonts

How to change default font before font-face loads?


In Firefox when a page loads it shows a default font (such as Times New Roman) for a moment (depending on connection speed) before it renders using the specified font-face. I understand this cannot be faster but how can I set, for example, Arial as the default font before it changes when the font-face loads?


Solution

  • Specifying an extra font in your font-family property will solve your problem.

    font-family: "YourFontFaceFont", arial;
    

    This will cause arial to be used until "YourFontFaceFont" is available.