Home > Blockchain >  Does the Open Sans font come with most web browsers? Or do I need to import it as a stylesheet?
Does the Open Sans font come with most web browsers? Or do I need to import it as a stylesheet?

Time:09-08

Let's say you want all the text on your web site to be in the Open Sans font. Is it enough to write,

html, body { font-family: "Open Sans"; font-size: 16px }

Or do I have to (in addition to the above) import Open Sans from google fonts?

In other words, do I really need to add a stylesheet from google fonts, e.g.

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open Sans" type="text/css">

Summary

What I'm really asking is, do I need to include the google fonts Open Sans stylesheet to format text in Open Sans? Or does Open Sans already come with most web browsers?

I would think that Open Sans comes with most web browsers. I would think that most web browsers have all the font files for standard fonts like Open Sans.

CodePudding user response:

Open Sans is no web-safe-font so you should not assume the user has it installed.

You find more info about web-safe-fonts here: https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Fundamentals#web_safe_fonts

I would prefer to load the font from my own server for privacy reasons. The is a good source for downloading google webfonts: https://google-webfonts-helper.herokuapp.com/fonts/open-sans?subsets=latin

The page seems to be down right now but just check later..

  • Related