SlideShare a Scribd company logo
Font embedding for the web




POZNAN, 18.06.2011     Wojtek Zajac.com
Disclaimer


    I am:
✦   NOT a native english speaker ☺
✦   NOT a typographer
✦   Web Designer & Developer
What is a CSS
 font stack?
A way to define fallback fonts



      I am in “love” with people abusing quotation marks.

                  ideal                  common


 font‐family:
Didot,
Garamond,
"Times
New
Roman",
serif;


                          alternative                generic
For years,
we’ve been limited
 to a small set of
 “web safe” fonts.
Fonts existing on 95% of PCs


                    Arial
       Arial                     Comic Sans
                    Black

     Courier
       New
                    Georgia        Impact


                   Palatino
    Lucida Sans                   Tahoma
                   Linotype

     Times New    Trebuchet MS
       Roman                      Verdana
So, we’ve had to come up
with some workarounds.
  (old-school methods)
2003: CSS Image Replacement




     Credits: Dave Shea
2005: sIFR   (Scalable Inman Flash Replacement)
2008: Cufón
None of them was perfect

✦   poor accessibility
✦   broken built-in browser search
✦   inability to use live translating tools (Google
    Translate)
✦   much decreased styling abilities
The winner is:
CSS3 @font-face
Learn a new CSS3 @font-face
syntax

 @font‐face
{
 

font‐family:
'Your‐font';
 

src:
url('Your‐font.ttf');
 }

 h1,
h2,
h3
{
 

font‐family:
'Your‐font',
'Georgia',
serif;
 }
Make it bulletproof
(yes, you can use it today)




  @font‐face
{
  

font‐family:
'Tagesschrift';
  

src:
url('tagesschrift.eot');
/*
IE
5‐8
*/

  

src:
local('☺'),












/*
sneakily
trick
IE
*/
  







url('tagesschrift.woff')
format('woff'),



/*
FF
3.6,
Chrome
5,
IE9
*/
  







url('tagesschrift.ttf')
format('truetype'),
/*
Opera,
Safari
*/
  







url('tagesschrift.svg#font')
format('svg');
/*
iOS
*/
  }
Or just use the Font Squirrel generator




 Font Squirrel generator
Problem?

Licenses
Use web font hosting services



   popular, the simplest to use                  personal (free) and paid accounts
   small, curated set of freely licensed fonts   wide range of fonts, mobile support




    over 10000 fonts to choose from               annual fee

    extensive localization support                doesn’t support desktop use



More: http://sprungmarker.de/wp-content/uploads/webfont-services/
Remember:
Buying a font license doesn’t always
     let you use it on the web.
Browse www.fontspring.com
     and www.fontshop.com
    to find professional fonts
ready for embedding for the web.
Thanks!


http://www.slideshare.net/wojciechzajac

Wojtek Zajac (@theanxy)                     This work is licensed
                                                    under
wojtek@wojtekzajac.com                      a Creative Commons
                                          Attribution 3.0 Unported

More Related Content

PDF
Web Typography: An Overview
PDF
The NEW Web Typography: Where the Sexy Is
PDF
Responsive Web Design: buzzword or revolution?
PDF
Antologia Webdevelopera (9.12.2006)
PDF
Accessible web applications
PDF
HTML5 i mikroformaty dla pragmatyków
PDF
Responsive websites. Toolbox
PDF
HTML5 and microformats for pragmatists
Web Typography: An Overview
The NEW Web Typography: Where the Sexy Is
Responsive Web Design: buzzword or revolution?
Antologia Webdevelopera (9.12.2006)
Accessible web applications
HTML5 i mikroformaty dla pragmatyków
Responsive websites. Toolbox
HTML5 and microformats for pragmatists

Similar to Font embedding for the web (20)

PDF
To Hell with Web Safe Fonts
PDF
Web Typography Tips
PDF
Making drupal beautiful with web fonts
PDF
Web Typography5 090725053013 Phpapp02
PDF
Beautiful Web Typography (#5)
KEY
Web Typography with sIFR 3 at Drupalcamp Copenhagen
PDF
The New Web Typography
PDF
New Web Typography
PDF
The Trouble With Type
PDF
Web Typography
PDF
Web Typography 2009
PDF
(Web ) Typography
ZIP
What the @font-face
PDF
Progressive Enhancement & Intentional Degradation 2
PDF
The type revolutionary's cookbook
PDF
new fonts for the web
PDF
Web Typography, A Long Dark
KEY
Web Fonts: Why Bother?
ODP
Css3 101
KEY
Typography online
To Hell with Web Safe Fonts
Web Typography Tips
Making drupal beautiful with web fonts
Web Typography5 090725053013 Phpapp02
Beautiful Web Typography (#5)
Web Typography with sIFR 3 at Drupalcamp Copenhagen
The New Web Typography
New Web Typography
The Trouble With Type
Web Typography
Web Typography 2009
(Web ) Typography
What the @font-face
Progressive Enhancement & Intentional Degradation 2
The type revolutionary's cookbook
new fonts for the web
Web Typography, A Long Dark
Web Fonts: Why Bother?
Css3 101
Typography online
Ad

Recently uploaded (20)

PDF
Phone away, tabs closed: No multitasking
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPTX
Tenders & Contracts Works _ Services Afzal.pptx
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PPT
UNIT I- Yarn, types, explanation, process
PPTX
Implications Existing phase plan and its feasibility.pptx
PPTX
AD Bungalow Case studies Sem 2.pptxvwewev
PDF
Urban Design Final Project-Site Analysis
PPTX
Wisp Textiles: Where Comfort Meets Everyday Style
PDF
Quality Control Management for RMG, Level- 4, Certificate
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPTX
An introduction to AI in research and reference management
PDF
Interior Structure and Construction A1 NGYANQI
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PDF
Africa 2025 - Prospects and Challenges first edition.pdf
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PPTX
Fundamental Principles of Visual Graphic Design.pptx
DOCX
The story of the first moon landing.docx
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPT
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
Phone away, tabs closed: No multitasking
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
Tenders & Contracts Works _ Services Afzal.pptx
YOW2022-BNE-MinimalViableArchitecture.pdf
UNIT I- Yarn, types, explanation, process
Implications Existing phase plan and its feasibility.pptx
AD Bungalow Case studies Sem 2.pptxvwewev
Urban Design Final Project-Site Analysis
Wisp Textiles: Where Comfort Meets Everyday Style
Quality Control Management for RMG, Level- 4, Certificate
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
An introduction to AI in research and reference management
Interior Structure and Construction A1 NGYANQI
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
Africa 2025 - Prospects and Challenges first edition.pdf
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
Fundamental Principles of Visual Graphic Design.pptx
The story of the first moon landing.docx
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
unit 1 ppt.ppthhhhhhhhhhhhhhhhhhhhhhhhhh
Ad

Font embedding for the web

  • 1. Font embedding for the web POZNAN, 18.06.2011 Wojtek Zajac.com
  • 2. Disclaimer I am: ✦ NOT a native english speaker ☺ ✦ NOT a typographer ✦ Web Designer & Developer
  • 3. What is a CSS font stack?
  • 4. A way to define fallback fonts I am in “love” with people abusing quotation marks. ideal common font‐family:
Didot,
Garamond,
"Times
New
Roman",
serif; alternative generic
  • 5. For years, we’ve been limited to a small set of “web safe” fonts.
  • 6. Fonts existing on 95% of PCs Arial Arial Comic Sans Black Courier New Georgia Impact Palatino Lucida Sans Tahoma Linotype Times New Trebuchet MS Roman Verdana
  • 7. So, we’ve had to come up with some workarounds. (old-school methods)
  • 8. 2003: CSS Image Replacement Credits: Dave Shea
  • 9. 2005: sIFR (Scalable Inman Flash Replacement)
  • 11. None of them was perfect ✦ poor accessibility ✦ broken built-in browser search ✦ inability to use live translating tools (Google Translate) ✦ much decreased styling abilities
  • 12. The winner is: CSS3 @font-face
  • 13. Learn a new CSS3 @font-face syntax @font‐face
{ 

font‐family:
'Your‐font'; 

src:
url('Your‐font.ttf'); } h1,
h2,
h3
{ 

font‐family:
'Your‐font',
'Georgia',
serif; }
  • 14. Make it bulletproof (yes, you can use it today) @font‐face
{ 

font‐family:
'Tagesschrift'; 

src:
url('tagesschrift.eot');
/*
IE
5‐8
*/
 

src:
local('☺'),












/*
sneakily
trick
IE
*/ 







url('tagesschrift.woff')
format('woff'),



/*
FF
3.6,
Chrome
5,
IE9
*/ 







url('tagesschrift.ttf')
format('truetype'),
/*
Opera,
Safari
*/ 







url('tagesschrift.svg#font')
format('svg');
/*
iOS
*/ }
  • 15. Or just use the Font Squirrel generator Font Squirrel generator
  • 17. Use web font hosting services popular, the simplest to use personal (free) and paid accounts small, curated set of freely licensed fonts wide range of fonts, mobile support over 10000 fonts to choose from annual fee extensive localization support doesn’t support desktop use More: http://sprungmarker.de/wp-content/uploads/webfont-services/
  • 18. Remember: Buying a font license doesn’t always let you use it on the web.
  • 19. Browse www.fontspring.com and www.fontshop.com to find professional fonts ready for embedding for the web.
  • 20. Thanks! http://www.slideshare.net/wojciechzajac Wojtek Zajac (@theanxy) This work is licensed under wojtek@wojtekzajac.com a Creative Commons Attribution 3.0 Unported

Editor's Notes

  • #2: \n
  • #3: At the beginning I will say that I am not a native english speaker, not a typographer.\n\nI am, though, a web designer & developer from Krakow.\n
  • #4: Please raise your hands: how many of you know what is a CSS font stack?\n
  • #5: CSS Fonts is a way to define fonts that are displayed if our desired font isn’t installed in users’ machine.\nIt defines the preferred order of “back up” fonts to use.\nIt should always end with a generic font-family.\n
  • #6: Web designers are often constrained by the so called “Web Safe Fonts” when creating web pages and whilst 95% of machines worldwide now have these fonts, they were first packaged with Windows XP back in 2001.\n
  • #7: These fonts exist on 95% of the machines. Of course it varies basing on the Operating System.\nAlso, devices like iPhone / iPad have much limited font set as well.\nYou will probably agree with me that these fonts are plainly overused.\n
  • #8: \n
  • #9: In early 2000s, we used various ways of image replacement. They could be generated dynamically to serve custom text and avoid generating it in advance.\nProblems with: transparency\n
  • #10: Then, Mike Davidson basing on the work of Shaun Inman published sIFR, a way to embed custom fonts to sites using Flash.\nThis solved a problem for some time, but the fonts couldn’t be used for body text. \nAlso, the flash text isn’t working for mobile devices.\n
  • #11: In 2008, Cufon came out and designers were very excited about it again.\nUnfortunately, this solution based on HTML Canvas, which is just a hack.\n
  • #12: \n
  • #13: \n
  • #14: Here is the new CSS3 syntax for embedding the fonts.\n
  • #15: There are 4 different types of formats for various browsers: otf&ttf, svg, woff and eot.\nThese different formats were caused by the differences of the browser vendors politics.\n
  • #16: Font Squirrel will let you get the generated files and the CSS ruleset\n
  • #17: Unfortunately, there is a problem with licenses.\nEmbedding font via @font-face means anybody can download it even if the font license forbids it.\n
  • #18: The solution: thankfully there are companies which will host the web fonts to you so you don’t have to care about the licensing problems.\nThe most popular are Google Web Fonts, Typekit, Fonts.com and Font Deck.\n
  • #19: \n
  • #20: \n
  • #21: \n