Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can you create font stacks with Google web fonts?

Explorer ,
Jan 06, 2021 Jan 06, 2021

When you choose a Google web font, it seems you can only choose one at a time and not create a set.  First of all, is there an easy way to create font stacks/sets from the web.   And do you have to create a web generator set for your site or just a link to google fonts?  

Is there plugin that makes this easier?  

334
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2021 Jan 06, 2021

Of course you can add as many Google Fonts as you wish. But the more web font scripts you add to your document, the longer it takes it load.  And this can adversely impact site performance.  For best results, use web fonts for special use cases such as headings and use font-families from the web-safe font stacks for routine content.

https://www.cssfontstack.com/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 07, 2021 Jan 07, 2021

How many font-families does a well designed website really need, 2 or 3 maximum, unless you're specifically producing something related to fonts. Multiple Google font-families can be combined using just the 1 api link.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2021 Jan 07, 2021

When you go to google web fonts you can select multiple fonts.  You just use their link/import code, and follow their instructions for CSS rules to apply families and you should be good to go. I've attached a screenshot of what this looks like.

 

Screen Shot 2021-01-07 at 8.17.33 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 07, 2021 Jan 07, 2021

It is difficult to select multiple fonts if they are not closely related by name.  For example I typed in Lato and selected it, but if I wanted Open Sans to be the backup, I have to confirm Lato before I can search for Open Sans. Otherwise i have to have all 2000 fonts open and scroll to do a multiple selection.  I guess that is what I mean.   As to the link code, that isn't automatic right? And is there a default linking insert? I.e., it doesn't auto generate when you select a google font, does it? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 07, 2021 Jan 07, 2021

Yes, both the Google font linked api AND the import api link is generated automatically as you select the fonts you require to use from the Google fonts website.

 

All you do is copy the api link generated by Google fonts and paste it in your pages code OR copy the import code generated by Google fonts and paste it in your css stylesheet. Add the font-family name to the body css or css selector to which you want the specific font applied.

 

I dont understand why its difficult to select multiple fonts if they are not closely related? You just look through the fonts and when you see one you like select it or keep note of it and keep searching, then go back and select those which are of interest, Google complies all those you select into 1 api link.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2021 Jan 07, 2021
LATEST

"...For example I typed in Lato and selected it, but if I wanted Open Sans to be the backup, ..."

 

CSS Webfonts are a replacement for font stacks in the font-family property. Browsers that recognize them simply read the font on the server and display it. If, for some reason a viewer is in IE8 or lower, no font you choose at Google Fonts will work. You would need a Web Safe font to be the backup in the font stack for archaic browsers.

 

The browsers that needed back-ups are long dead though, even IE9 recognized them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2021 Jan 07, 2021

This isn't a Dreamweaver question.  This is a question for Google Web Fonts.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines