SlideShare uma empresa Scribd logo
1 de 20
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

Mais conteúdo relacionado

Semelhante a Font embedding for the web

To Hell with Web Safe Fonts
To Hell with Web Safe FontsTo Hell with Web Safe Fonts
To Hell with Web Safe FontsLennart Schoors
 
Web Typography Tips
Web Typography TipsWeb Typography Tips
Web Typography TipsSara Cannon
 
Making drupal beautiful with web fonts
Making drupal beautiful with web fontsMaking drupal beautiful with web fonts
Making drupal beautiful with web fontsFour Kitchens
 
Web Typography5 090725053013 Phpapp02
Web Typography5 090725053013 Phpapp02Web Typography5 090725053013 Phpapp02
Web Typography5 090725053013 Phpapp02F Blanco
 
Beautiful Web Typography (#5)
Beautiful Web Typography (#5)Beautiful Web Typography (#5)
Beautiful Web Typography (#5)Pascal Klein
 
Web Typography with sIFR 3 at Drupalcamp Copenhagen
Web Typography with sIFR 3 at Drupalcamp CopenhagenWeb Typography with sIFR 3 at Drupalcamp Copenhagen
Web Typography with sIFR 3 at Drupalcamp CopenhagenMark Wubben
 
The New Web Typography
The New Web TypographyThe New Web Typography
The New Web TypographyForum One
 
New Web Typography
New Web TypographyNew Web Typography
New Web TypographyMonotype
 
Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2elliotjaystocks
 
The type revolutionary's cookbook
The type revolutionary's cookbookThe type revolutionary's cookbook
The type revolutionary's cookbookFour Kitchens
 
Web Typography, A Long Dark
Web Typography, A Long Dark Web Typography, A Long Dark
Web Typography, A Long Dark Ryan LaBouve
 
Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?Greg Veen
 
Typography online
Typography onlineTypography online
Typography onlineJake Smith
 

Semelhante a Font embedding for the web (20)

To Hell with Web Safe Fonts
To Hell with Web Safe FontsTo Hell with Web Safe Fonts
To Hell with Web Safe Fonts
 
Web Typography Tips
Web Typography TipsWeb Typography Tips
Web Typography Tips
 
Making drupal beautiful with web fonts
Making drupal beautiful with web fontsMaking drupal beautiful with web fonts
Making drupal beautiful with web fonts
 
Web Typography5 090725053013 Phpapp02
Web Typography5 090725053013 Phpapp02Web Typography5 090725053013 Phpapp02
Web Typography5 090725053013 Phpapp02
 
Beautiful Web Typography (#5)
Beautiful Web Typography (#5)Beautiful Web Typography (#5)
Beautiful Web Typography (#5)
 
Web Typography with sIFR 3 at Drupalcamp Copenhagen
Web Typography with sIFR 3 at Drupalcamp CopenhagenWeb Typography with sIFR 3 at Drupalcamp Copenhagen
Web Typography with sIFR 3 at Drupalcamp Copenhagen
 
The New Web Typography
The New Web TypographyThe New Web Typography
The New Web Typography
 
New Web Typography
New Web TypographyNew Web Typography
New Web Typography
 
The Trouble With Type
The Trouble With TypeThe Trouble With Type
The Trouble With Type
 
Web Typography
Web TypographyWeb Typography
Web Typography
 
Web Typography 2009
Web Typography 2009Web Typography 2009
Web Typography 2009
 
(Web ) Typography
(Web ) Typography(Web ) Typography
(Web ) Typography
 
What the @font-face
What the @font-faceWhat the @font-face
What the @font-face
 
Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2
 
The type revolutionary's cookbook
The type revolutionary's cookbookThe type revolutionary's cookbook
The type revolutionary's cookbook
 
new fonts for the web
new fonts for the webnew fonts for the web
new fonts for the web
 
Web Typography, A Long Dark
Web Typography, A Long Dark Web Typography, A Long Dark
Web Typography, A Long Dark
 
Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?
 
Css3 101
Css3 101Css3 101
Css3 101
 
Typography online
Typography onlineTypography online
Typography online
 

Último

Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service AvailableNitya salvi
 
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证eeanqy
 
ab-initio-training basics and architecture
ab-initio-training basics and architectureab-initio-training basics and architecture
ab-initio-training basics and architecturesaipriyacoool
 
poliovirus-190801072449. pptx
poliovirus-190801072449.            pptxpoliovirus-190801072449.            pptx
poliovirus-190801072449. pptxssuser0ad194
 
How to Turn a Picture Into a Line Drawing in Photoshop
How to Turn a Picture Into a Line Drawing in PhotoshopHow to Turn a Picture Into a Line Drawing in Photoshop
How to Turn a Picture Into a Line Drawing in PhotoshopZenith Clipping
 
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...nirzagarg
 
Independent Escorts Goregaon WhatsApp +91-9930687706, Best Service
Independent Escorts Goregaon WhatsApp +91-9930687706, Best ServiceIndependent Escorts Goregaon WhatsApp +91-9930687706, Best Service
Independent Escorts Goregaon WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样awasv46j
 
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Nitya salvi
 
TRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptxTRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptxtrose8
 
Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxbingyichin04
 
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...samsungultra782445
 
Essential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive GuideEssential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive GuideDesign Studio UI UX
 
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...Nitya salvi
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfamanda2495
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Websitemark11275
 
Lecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptxLecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptxShoaibRajper1
 
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEKLANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEKMarekMitek1
 
How to Create a Productive Workspace Trends and Tips.pdf
How to Create a Productive Workspace Trends and Tips.pdfHow to Create a Productive Workspace Trends and Tips.pdf
How to Create a Productive Workspace Trends and Tips.pdfOffice Furniture Plus - Irving
 
BLOCK CHAIN PROJECT block chain project
BLOCK CHAIN  PROJECT block chain projectBLOCK CHAIN  PROJECT block chain project
BLOCK CHAIN PROJECT block chain projectujraj8767
 

Último (20)

Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
 
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
 
ab-initio-training basics and architecture
ab-initio-training basics and architectureab-initio-training basics and architecture
ab-initio-training basics and architecture
 
poliovirus-190801072449. pptx
poliovirus-190801072449.            pptxpoliovirus-190801072449.            pptx
poliovirus-190801072449. pptx
 
How to Turn a Picture Into a Line Drawing in Photoshop
How to Turn a Picture Into a Line Drawing in PhotoshopHow to Turn a Picture Into a Line Drawing in Photoshop
How to Turn a Picture Into a Line Drawing in Photoshop
 
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
 
Independent Escorts Goregaon WhatsApp +91-9930687706, Best Service
Independent Escorts Goregaon WhatsApp +91-9930687706, Best ServiceIndependent Escorts Goregaon WhatsApp +91-9930687706, Best Service
Independent Escorts Goregaon WhatsApp +91-9930687706, Best Service
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Ratnagiri Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
 
TRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptxTRose UXPA Experience Design Concord .pptx
TRose UXPA Experience Design Concord .pptx
 
Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptx
 
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
Essential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive GuideEssential UI/UX Design Principles: A Comprehensive Guide
Essential UI/UX Design Principles: A Comprehensive Guide
 
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
 
Lecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptxLecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptx
 
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEKLANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
LANDSCAPE ARCHITECTURE PORTFOLIO - MAREK MITACEK
 
How to Create a Productive Workspace Trends and Tips.pdf
How to Create a Productive Workspace Trends and Tips.pdfHow to Create a Productive Workspace Trends and Tips.pdf
How to Create a Productive Workspace Trends and Tips.pdf
 
BLOCK CHAIN PROJECT block chain project
BLOCK CHAIN  PROJECT block chain projectBLOCK CHAIN  PROJECT block chain project
BLOCK CHAIN PROJECT block chain project
 

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

Notas do Editor

  1. \n
  2. At the beginning I will say that I am not a native english speaker, not a typographer.\n\nI am, though, a web designer &amp; developer from Krakow.\n
  3. Please raise your hands: how many of you know what is a CSS font stack?\n
  4. CSS Fonts is a way to define fonts that are displayed if our desired font isn&amp;#x2019;t installed in users&amp;#x2019; machine.\nIt defines the preferred order of &amp;#x201C;back up&amp;#x201D; fonts to use.\nIt should always end with a generic font-family.\n
  5. Web designers are often constrained by the so called &amp;#x201C;Web Safe Fonts&amp;#x201D; 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
  6. 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
  7. \n
  8. 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
  9. 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&amp;#x2019;t be used for body text. \nAlso, the flash text isn&amp;#x2019;t working for mobile devices.\n
  10. 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
  11. \n
  12. \n
  13. Here is the new CSS3 syntax for embedding the fonts.\n
  14. There are 4 different types of formats for various browsers: otf&amp;ttf, svg, woff and eot.\nThese different formats were caused by the differences of the browser vendors politics.\n
  15. Font Squirrel will let you get the generated files and the CSS ruleset\n
  16. 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
  17. The solution: thankfully there are companies which will host the web fonts to you so you don&amp;#x2019;t have to care about the licensing problems.\nThe most popular are Google Web Fonts, Typekit, Fonts.com and Font Deck.\n
  18. \n
  19. \n
  20. \n