DEV Community

Alexandra Grazhevskaja for Aspose.Slides

Posted on • Updated on

What is fallback font?

I am exploring what fallback font is, working under an article about Aspose.Slides product. I am curious to know how would someone explain what is fallback font, like I am five!πŸ˜€πŸ€”

Please, explain me in comments!πŸ‘‡

Top comments (3)

nataliedeweerd profile image
𝐍𝐚𝐭𝐚π₯𝐒𝐞 𝐝𝐞 π–πžπžπ«π

Fallback (noun) - A fallback plan or position can be used if other plans do not succeed or other things are not available. -

So basically fallback fonts are used when the current font isn't available. For example, if your CSS selector looked like this:

h1 {
    font-family: 'Roboto', 'Open Sans', Helvetica, Arial, sans-serif;
Enter fullscreen mode Exit fullscreen mode

The website will basically parse this as:

  1. Is 'Roboto' available? No? Try the next one.
  2. Is 'Open Sans' available? No? Try the next one.
  3. Is Helvetica available? No? Try the next one.
  4. Is Arial available? No? Try the next one.
  5. Final fall-back to genetic sans-serif font.

As soon as it finds a font which is available, it will stop. So if Helvetica was available, it would simply stop there and show that font.

Final fallback's should always be generic types, e.g.

  • serif
  • sans-serif
  • cursive
  • monospace
stevenselcuk profile image
Steven J. Selcuk

This article explains well πŸ‘‰

Some comments may only be visible to logged-in visitors. Sign in to view all comments.