SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
CSS
FONT STACKS
What are font
  stacks?
Font stacks are about creating a
  relevant and comprehensive
list of fall-back fonts - based on
aspect ratio, platforms, operating
             systems etc.
A bad example
What’s wrong here?



body
{
    font-family: Verdana, Arial,
    sans-serif;
}
Problem 1:
There are a limited number of
       fallback fonts.
Problem 2:
   The fonts used may not be
available for all operating systems
   (eg. Windows, Mac, Linux).
Problem 3:
The fonts used have different
       “aspect ratios”
What is
aspect ratio?
Some fonts, especially those
specifically designed for screen,
 may appear wider and/or taller
        than other fonts.




 ax ax
  Verdana @200pt   Helvetica @200pt
This means that these fonts have
     a larger aspect ratio.
If you use font’s with different
    aspect ratio, some people may
      see your pages with a much
    smaller font size than others.

body            Larger aspect ratio
{
    font-family: Verdana, Arial,
    sans-serif;
                               Smaller aspect ratio
}
Ideally, your font stacks should
include a range of fonts that have
      a similar aspect ratio.
The basic font
stacks based on
  aspect ratio
Wide sans-serif stack

         eg:
    Verdana
    Geneva
Narrow sans-serif stack

          eg:
     Tahoma
      Arial
     Hevetica
Wide serif stack

      eg:
  Georgia
  Utopia
Narrow serif stack

        eg:
      Times
Times New Roman
Monospace stack

      eg:
  Courier
Courier New
Some steps to
creating a good
   font stack
1. Pick the font you like
     eg. Helvetica Neue
2. Determine which
basic font-stack it belongs in
       eg. Narrow sans-serif
3. Choose a preferred Linux
 variation and a highly available
             variation
eg. DejaVu Sans - 90.76% availability on Linux
 URW Gothic L - 97.14% availability on Linux
4. Choose a preferred Macintosh
   variation and highly available
              variation
eg. Helvetica Neue - 95.11% availability on Mac,
     Helvetica - 100.00% availability on Mac
5. Choose a preferred Windows
  variation and a highly available
              variation
     eg. Arial - 99.32% availability on Win,
Microsoft Sans-serif - 99.71% availability on Win
6. Include the generic font family
           eg. sans-serif
7. Make sure fonts with
white-space in names are
wrapped in single or double
         quotes.
    (eg. “Microsoft Sans-serif”)
A better font stack?

body
{
    font-family:
    "DejaVu Sans", "URW Gothic L",
    "Helvetica Neue”, Helvetica,
    Arial, "Microsoft Sans Serif",
    sans-serif;
}
Results
Font name              Windows     Mac     Linux
DejaVu Sans              0.00%   0.00%    90.76%
URW Gothic L             0.00%   0.00%    8.98%
Helvetica Neue           1.51%   95.11%   0.00%
Helvetica                7.08%   4.89%    0.07%
Arial                   90.79%   0.00%    0.13%
Microsoft Sans Serif     0.62%   0.00%    0.00%
sans-serif               0.00%   0.00%    0.06%
A great font-stack builder

               Font stack
http://www.codestyle.org/servlets/FontStack

Más contenido relacionado

Similar a CSS font-stacks

Best Practices for Incredible Web Typography
Best Practices for Incredible Web TypographyBest Practices for Incredible Web Typography
Best Practices for Incredible Web Typography
Extensis
 
รายงานมล อ้อม
รายงานมล อ้อมรายงานมล อ้อม
รายงานมล อ้อม
Kamonchanok082
 
Font embedding for the web
Font embedding for the webFont embedding for the web
Font embedding for the web
Wojtek Zając
 
What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...
What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...
What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...
Shobhit Jain
 

Similar a CSS font-stacks (20)

New Web Typography
New Web TypographyNew Web Typography
New Web Typography
 
Typography and online communication
Typography and online communication Typography and online communication
Typography and online communication
 
CSS - Cascading Style Sheets
CSS - Cascading Style SheetsCSS - Cascading Style Sheets
CSS - Cascading Style Sheets
 
Design Concepts and Web Design
Design Concepts and Web DesignDesign Concepts and Web Design
Design Concepts and Web Design
 
Web Typography
Web TypographyWeb Typography
Web Typography
 
Html fonts
Html fontsHtml fonts
Html fonts
 
Html fonts
Html fontsHtml fonts
Html fonts
 
Unit 2 graphics
Unit 2 graphicsUnit 2 graphics
Unit 2 graphics
 
Web font services: March 2011
Web font services: March 2011Web font services: March 2011
Web font services: March 2011
 
Typography On The Web
Typography On The WebTypography On The Web
Typography On The Web
 
Fonts
FontsFonts
Fonts
 
Chap7
Chap7Chap7
Chap7
 
Best Practices for Incredible Web Typography
Best Practices for Incredible Web TypographyBest Practices for Incredible Web Typography
Best Practices for Incredible Web Typography
 
Great typography == Great Design - Part 2
Great typography == Great Design - Part 2Great typography == Great Design - Part 2
Great typography == Great Design - Part 2
 
Stem 22 text
Stem 22 textStem 22 text
Stem 22 text
 
รายงานมล อ้อม
รายงานมล อ้อมรายงานมล อ้อม
รายงานมล อ้อม
 
Font embedding for the web
Font embedding for the webFont embedding for the web
Font embedding for the web
 
What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...
What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...
What is Font and Typefaces? Explain any five font’s families in DTP. By Shobh...
 
CSS properties.docx
CSS properties.docxCSS properties.docx
CSS properties.docx
 
N-Share: Typography
N-Share: TypographyN-Share: Typography
N-Share: Typography
 

Más de Russ Weakley

Más de Russ Weakley (20)

Accessible chat windows
Accessible chat windowsAccessible chat windows
Accessible chat windows
 
Accessible names & descriptions
Accessible names & descriptionsAccessible names & descriptions
Accessible names & descriptions
 
A deep dive into accessible names
A deep dive into accessible namesA deep dive into accessible names
A deep dive into accessible names
 
What are accessible names and why should you care?
What are accessible names and why should you care?What are accessible names and why should you care?
What are accessible names and why should you care?
 
How to build accessible UI components
How to build accessible UI componentsHow to build accessible UI components
How to build accessible UI components
 
What is WCAG 2 and why should we care?
What is WCAG 2 and why should we care?What is WCAG 2 and why should we care?
What is WCAG 2 and why should we care?
 
Accessible states in Design Systems
Accessible states in Design SystemsAccessible states in Design Systems
Accessible states in Design Systems
 
Creating accessible modals and autocompletes
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletes
 
Building an accessible progressive loader
Building an accessible progressive loaderBuilding an accessible progressive loader
Building an accessible progressive loader
 
Accessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and gloryAccessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and glory
 
Accessible Inline errors messages
Accessible Inline errors messagesAccessible Inline errors messages
Accessible Inline errors messages
 
Accessible Form Hints and Errors
Accessible Form Hints and ErrorsAccessible Form Hints and Errors
Accessible Form Hints and Errors
 
What is accessibility?
What is accessibility?What is accessibility?
What is accessibility?
 
Accessibility in Pattern Libraries
Accessibility in Pattern LibrariesAccessibility in Pattern Libraries
Accessibility in Pattern Libraries
 
Accessibility in pattern libraries
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern libraries
 
Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24
 
Building an accessible auto-complete
Building an accessible auto-completeBuilding an accessible auto-complete
Building an accessible auto-complete
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
 
Creating an Accessible button dropdown
Creating an Accessible button dropdownCreating an Accessible button dropdown
Creating an Accessible button dropdown
 
Creating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchCreating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off Switch
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

CSS font-stacks

  • 2. What are font stacks?
  • 3. Font stacks are about creating a relevant and comprehensive list of fall-back fonts - based on aspect ratio, platforms, operating systems etc.
  • 5. What’s wrong here? body { font-family: Verdana, Arial, sans-serif; }
  • 6. Problem 1: There are a limited number of fallback fonts.
  • 7. Problem 2: The fonts used may not be available for all operating systems (eg. Windows, Mac, Linux).
  • 8. Problem 3: The fonts used have different “aspect ratios”
  • 10. Some fonts, especially those specifically designed for screen, may appear wider and/or taller than other fonts. ax ax Verdana @200pt Helvetica @200pt
  • 11. This means that these fonts have a larger aspect ratio.
  • 12. If you use font’s with different aspect ratio, some people may see your pages with a much smaller font size than others. body Larger aspect ratio { font-family: Verdana, Arial, sans-serif; Smaller aspect ratio }
  • 13. Ideally, your font stacks should include a range of fonts that have a similar aspect ratio.
  • 14. The basic font stacks based on aspect ratio
  • 15. Wide sans-serif stack eg: Verdana Geneva
  • 16. Narrow sans-serif stack eg: Tahoma Arial Hevetica
  • 17. Wide serif stack eg: Georgia Utopia
  • 18. Narrow serif stack eg: Times Times New Roman
  • 19. Monospace stack eg: Courier Courier New
  • 20. Some steps to creating a good font stack
  • 21. 1. Pick the font you like eg. Helvetica Neue
  • 22. 2. Determine which basic font-stack it belongs in eg. Narrow sans-serif
  • 23. 3. Choose a preferred Linux variation and a highly available variation eg. DejaVu Sans - 90.76% availability on Linux URW Gothic L - 97.14% availability on Linux
  • 24. 4. Choose a preferred Macintosh variation and highly available variation eg. Helvetica Neue - 95.11% availability on Mac, Helvetica - 100.00% availability on Mac
  • 25. 5. Choose a preferred Windows variation and a highly available variation eg. Arial - 99.32% availability on Win, Microsoft Sans-serif - 99.71% availability on Win
  • 26. 6. Include the generic font family eg. sans-serif
  • 27. 7. Make sure fonts with white-space in names are wrapped in single or double quotes. (eg. “Microsoft Sans-serif”)
  • 28. A better font stack? body { font-family: "DejaVu Sans", "URW Gothic L", "Helvetica Neue”, Helvetica, Arial, "Microsoft Sans Serif", sans-serif; }
  • 29. Results Font name Windows Mac Linux DejaVu Sans 0.00% 0.00% 90.76% URW Gothic L 0.00% 0.00% 8.98% Helvetica Neue 1.51% 95.11% 0.00% Helvetica 7.08% 4.89% 0.07% Arial 90.79% 0.00% 0.13% Microsoft Sans Serif 0.62% 0.00% 0.00% sans-serif 0.00% 0.00% 0.06%
  • 30. A great font-stack builder Font stack http://www.codestyle.org/servlets/FontStack