SlideShare a Scribd company logo
1 of 46
Download to read offline
Making Drupal beautiful
 with web fonts
 Designing in the @font-face of danger




Aaron Stanush
Dallas Drupal Days – July 9, 2011
A little bit of history
It only took a decade

• 1997: CSS2 introduces @font-face

 • IE4 supports @font-face

• 2008: Safari 3.1 supports @font-face

• 2009: Firefox 3.5 supports @font-face

• 2010: Chrome 4 supports @font-face

 • iOS 4 supports TrueType

 • Firefox 3.6, Chrome 6, IE9 support WOFF

 • W3C publishes working draft for WOFF
Before                        After
• sIFR                        • Web fonts

 • Flash-based                 • CSS + Web font file

 • Liked by foundries          • Hosted option

 • Hated by designers          • WOFF = Security

• Cufón                        • It’s just text

 • Javascript/JSON

 • Lightweight

 • Not trusted by foundries
Then


• Arial          • Times

• Georgia        • Palatino
• Trebuchet MS   • Helvetica
• Verdana        • Courier New
• Impact         • Comic Sans
aigcorporate.com
smartmoney.com
Now




lostworldsfairs.com/moon
The new web font
ecosystem
Foundries                 &                  Designers



 Fonts      Museo      Gotham       Avenir




   Formats      TTF   WOFF    EOT   SVG



                      @font-face


                                             Font hosting
 Self-hosted
                                             services
Commerical fonts
‣   Foundries
    ‣   Hoefler Frere-Jones, FontFont, House Industries,
        EmType, exljbris, etc.
‣   Font stores
    ‣   FontShop.com
    ‣   MyFonts.com
Web font licensing
It’s complicated. Everybody has their own rules.

webfonts.info/wiki/index.php?title=Web_fonts_licensing_overview
Free and open source

• Font Squirrel

 • fontsquirrel.com

• Google Web Fonts

 • code.google.com/webfonts

• League of Movable Type

 • theleagueofmovabletype.com

• Lost Type Co-op

 • losttype.com
SIL Open font license


“
         It means that you're allowed to use these fonts
         personally or commercially, as long as you
         credit the original creator, and if you made
         tweaks and changes to the typefaces, any new
         typefaces resulting from it should be licensed
         under the same terms. That way all our fonts
         and any new fonts resulting from them will
         always be open.

         http://scripts.sil.org/OFL

theleagueofmoveabletype.com/manifesto
Web font formats

• Embedded OpenType (EOT)   • Web Open Font Format
                             (WOFF)
 • TrueType + DRM
                             • W3C standard (soon)
 • Created by Microsoft
                             • 40% smaller than TTF
• TrueType (TTF)
                             • Contains metadata
 • Standard desktop
   format

• SVG

 • Used for iOS 3
Why do we need all these
 crazy font formats?




Credit: shoze.blogspot.com
@font-face browser support


             Firefox 3.6+   Chrome 6+     IE 6-8     IE9        Safari 3.1+   iOS 4.2   Android 2.2



    EOT                                    • •
     TTF          •            •                                   •           •           •
    SVG                        •                                               •
   WOFF           •            •                     •
webfonts.info/wiki/index.php?title=@font-face_browser_support
@font-face kits


• Multiple file types

 • EOT, WOFF, TTF, SVG, Cufon, HTML, CSS

• Pre-built kits

 • fontsquirrel.com/fontface

• Build your own

 • fontsquirrel.com/fontface/generator
The bulletproof
@font-face method
@font-face


@font-face {
  font-family: Gotham;
  src: url('gotham.ttf');
  }
the real @font-face


  @font-face {
    font-family: 'Gotham';
      src: url('gotham.eot') format('eot'),
      src: url('gotham.eot?#iefix') format('embedded-opentype'),
           url('gotham.woff') format('woff'),
           url('gotham.ttf') format('truetype'),
           url('gotham.svg#gotham') format('svg');
    }




fontspring.com/blog/further-hardening-of-the-bulletproof-syntax
EOT: IE9 compatibility mode


@font-face {
  font-family: 'Gotham';
    src: url('gotham.eot') format('eot'),
    src: url('gotham.eot?#iefix') format('embedded-opentype'),
         url('gotham.woff') format('woff'),
         url('gotham.ttf') format('truetype'),
         url('gotham.svg#gotham') format('svg');
  }



                      IE9 compatibility mode
EOT: IE6, 7, 8


@font-face {
  font-family: 'Gotham';
    src: url('gotham.eot') format('eot'),
    src: url('gotham.eot?#iefix') format('embedded-opentype'),
         url('gotham.woff') format('woff'),
         url('gotham.ttf') format('truetype'),
         url('gotham.svg#gotham') format('svg');
  }



              Unfortunately, you need the ?# to trick IE.
WOFF: Chrome, Firefox, IE9


@font-face {
  font-family: 'Gotham';
    src: url('gotham.eot') format('eot'),
    src: url('gotham.eot?#iefix') format('embedded-opentype'),
         url('gotham.woff') format('woff'),
         url('gotham.ttf') format('truetype'),
         url('gotham.svg#gotham') format('svg');
  }
TTF: iOS 4, legacy browsers


@font-face {
  font-family: 'Gotham';
    src: url('gotham.eot') format('eot'),
    src: url('gotham.eot?#iefix') format('embedded-opentype'),
         url('gotham.woff') format('woff'),
         url('gotham.ttf') format('truetype'),
         url('gotham.svg#gotham') format('svg');
  }
SVG: iOS 3


@font-face {
  font-family: 'Gotham';
    src: url('gotham.eot') format('eot'),
    src: url('gotham.eot?#iefix') format('embedded-opentype'),
         url('gotham.woff') format('woff'),
         url('gotham.ttf') format('truetype'),
         url('gotham.svg#gotham') format('svg');
  }


  If the # value was not provided for you, open the SVG file in a text editor and look for:
                            font id="mySVGFontName"
The joy of multiple
weights
Bold and non-bold. Hooray.

     Verdana              Verdana bold
     Verdana italic       Verdana bold italic


@h1 {
  font-family: Verdana;
  font-weight: bold;
  }


@h2 {
  font-family: Verdana;
  font-weight: normal;
  }
Real fonts have big families


Gotham Light
Gotham Light Italic
Gotham Book
Gotham Book Italic
Gotham Medium
Gotham Medium Italic
Gotham Bold
Gotham Bold Italic
Gotham Black
Gotham Black Italic
Variant                font-weight   font-style
Gotham Light           100           normal
Gotham Light Italic    100           italic
Gotham Book            200           normal
Gotham Book Italic     200           italic
Gotham Medium          300           normal
Gotham Medium Italic   300           italic
Gotham Bold            400           normal
Gotham Bold Italic     400           italic
Gotham Black           500           normal
Gotham Black Italic    500           italic
You can apply the same font-family
 name to each variant, as long as you
set the font-weight and font-style for
                each.
Calling each font by name. Eh.

@font-face {
  font-family: ‘Gotham Light’;
  src: url('gotham-light.ttf') format('truetype');
  font-weight: 100;
  }



h2 {
  font-family: ‘Gotham Light’;
  }
One family, many weights. Boom.
  @font-face {
    font-family: ‘Gotham’;
    src: url('gotham-light.ttf') format('truetype');
    font-weight: 100;
    }

  @font-face {
    font-family: ‘Gotham’;
    src: url('gotham-black.ttf') format('truetype');
    font-weight: 500;
    }

  h1 { /* Gotham Black */                                          h2 { /* Gotham Light */
    font-family: ‘Gotham’;                                           font-family: ‘Gotham’;
    font-weight: 500;                                                font-weight: 100;
    }                                                                }

456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple
Italics too

  @font-face {
    font-family: ‘Gotham’;
    src: url('gotham-light-italic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
    }

  .caption {
    font-family: ‘Gotham’;
    font-weight: 100;
    font-style: italic;
    }



456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple
Web font hosting
services
Web font hosting

• Pros                  • Cons

 • Large selection of    • Not free: Pay by
   high-quality fonts     pageviews or per
                          font
 • Very little coding
                         • No desktop version
 • No worrying about      of the font
   licensing
                         • Dependent on third-
 • No expensive font      party service
   purchases
Web font hosting services


• Paid                  • Free

 • Typekit.com           • google.com/
                           webfonts
 • webfonts.fonts.com

 • Fontdeck.com

 • Kernest.com
Who’s the best?
bit.ly/web-font-hosts
Web fonts in Drupal
@font-your-face module


• Supports multiple font-hosting services

• No Javascript to add to your templates

• Browse font collection inside Drupal

• Assign CSS selectors through the UI



 drupal.org/projects/font-your-face
Best practices
Best practices


• Only load the fonts you need

• Always use fallback fonts

• FOUT - Flash of Unstyled Text

• Font events

• Test, test, test
Web design is
exciting again
lostworldsfairs.com
Aaron Stanush
aaron@fourkitchens.com                 @aaronstanush




fourkitchens.com/presentations   slideshare.net/fourkitchens
Thanks!




 All content in this presentation, except where noted otherwise, is Creative Commons Attribution-
 ShareAlike 3.0 licensed and copyright 2009 Four Kitchen Studios, LLC.

More Related Content

What's hot

Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?Greg Veen
 
The type revolutionary's cookbook
The type revolutionary's cookbookThe type revolutionary's cookbook
The type revolutionary's cookbookFour Kitchens
 
Webfonts: Demystified
Webfonts: DemystifiedWebfonts: Demystified
Webfonts: DemystifiedMel Choyce
 
WOFF and emerging technology of web fonts
WOFF and emerging technology of web fontsWOFF and emerging technology of web fonts
WOFF and emerging technology of web fontsVladimir Levantovsky
 
Web Form Design (Web Visions 2009)
Web Form Design (Web Visions 2009)Web Form Design (Web Visions 2009)
Web Form Design (Web Visions 2009)Christopher Schmitt
 
Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2elliotjaystocks
 

What's hot (11)

Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?
 
The type revolutionary's cookbook
The type revolutionary's cookbookThe type revolutionary's cookbook
The type revolutionary's cookbook
 
Webfonts: Demystified
Webfonts: DemystifiedWebfonts: Demystified
Webfonts: Demystified
 
CSS3 3D Workshop
CSS3 3D WorkshopCSS3 3D Workshop
CSS3 3D Workshop
 
WOFF and emerging technology of web fonts
WOFF and emerging technology of web fontsWOFF and emerging technology of web fonts
WOFF and emerging technology of web fonts
 
Web Form Design (Web Visions 2009)
Web Form Design (Web Visions 2009)Web Form Design (Web Visions 2009)
Web Form Design (Web Visions 2009)
 
Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2
 
AIGA EDGE
AIGA EDGEAIGA EDGE
AIGA EDGE
 
Dev Theming
Dev ThemingDev Theming
Dev Theming
 
HTML5 Update
HTML5 UpdateHTML5 Update
HTML5 Update
 
Responsive Web Fonts
Responsive Web FontsResponsive Web Fonts
Responsive Web Fonts
 

Similar to Making drupal beautiful with web fonts

The state of web typography
The state of web typographyThe state of web typography
The state of web typographyFour Kitchens
 
New Web Typography
New Web TypographyNew Web Typography
New Web TypographyMonotype
 
CSS @font-face : Personalized fonts
CSS @font-face : Personalized fontsCSS @font-face : Personalized fonts
CSS @font-face : Personalized fontsYves Van Goethem
 
Mix10 final snook_ds15
Mix10 final snook_ds15Mix10 final snook_ds15
Mix10 final snook_ds15Jonathan Snook
 
Web font services: March 2011
Web font services: March 2011Web font services: March 2011
Web font services: March 2011RZasadzinski
 
Font Embedding With CSS3
Font Embedding With CSS3Font Embedding With CSS3
Font Embedding With CSS3jeremyflint
 
Typography online
Typography onlineTypography online
Typography onlineJake Smith
 
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: Where the Sexy Is
The NEW Web Typography: Where the Sexy IsThe NEW Web Typography: Where the Sexy Is
The NEW Web Typography: Where the Sexy IsJason CranfordTeague
 
The New Web Typography
The New Web TypographyThe New Web Typography
The New Web TypographyForum One
 
Web Safe Fonts are Dead Series | Part 1: Web Typography Reincarnated
Web Safe Fonts are Dead Series | Part 1: Web Typography ReincarnatedWeb Safe Fonts are Dead Series | Part 1: Web Typography Reincarnated
Web Safe Fonts are Dead Series | Part 1: Web Typography ReincarnatedExtensis
 
Implementing @font-face
Implementing @font-faceImplementing @font-face
Implementing @font-faceAban Nesta
 
Font embedding for the web
Font embedding for the webFont embedding for the web
Font embedding for the webWojtek Zając
 
User Defined Characters Solution Proposal
User Defined Characters Solution ProposalUser Defined Characters Solution Proposal
User Defined Characters Solution ProposalJun Fujisawa
 
Typography for WordPress
Typography for WordPressTypography for WordPress
Typography for WordPressNile Flores
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 WorkshopChristopher Schmitt
 

Similar to Making drupal beautiful with web fonts (20)

The state of web typography
The state of web typographyThe state of web typography
The state of web typography
 
What the @font-face
What the @font-faceWhat the @font-face
What the @font-face
 
New Web Typography
New Web TypographyNew Web Typography
New Web Typography
 
CSS @font-face : Personalized fonts
CSS @font-face : Personalized fontsCSS @font-face : Personalized fonts
CSS @font-face : Personalized fonts
 
Mix10 final snook_ds15
Mix10 final snook_ds15Mix10 final snook_ds15
Mix10 final snook_ds15
 
Web font services: March 2011
Web font services: March 2011Web font services: March 2011
Web font services: March 2011
 
Font Embedding With CSS3
Font Embedding With CSS3Font Embedding With CSS3
Font Embedding With CSS3
 
Typography online
Typography onlineTypography online
Typography online
 
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 Trouble With Type
The Trouble With TypeThe Trouble With Type
The Trouble With Type
 
The NEW Web Typography: Where the Sexy Is
The NEW Web Typography: Where the Sexy IsThe NEW Web Typography: Where the Sexy Is
The NEW Web Typography: Where the Sexy Is
 
The New Web Typography
The New Web TypographyThe New Web Typography
The New Web Typography
 
Web Safe Fonts are Dead Series | Part 1: Web Typography Reincarnated
Web Safe Fonts are Dead Series | Part 1: Web Typography ReincarnatedWeb Safe Fonts are Dead Series | Part 1: Web Typography Reincarnated
Web Safe Fonts are Dead Series | Part 1: Web Typography Reincarnated
 
[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover
 
Implementing @font-face
Implementing @font-faceImplementing @font-face
Implementing @font-face
 
Font embedding for the web
Font embedding for the webFont embedding for the web
Font embedding for the web
 
User Defined Characters Solution Proposal
User Defined Characters Solution ProposalUser Defined Characters Solution Proposal
User Defined Characters Solution Proposal
 
Css3 101
Css3 101Css3 101
Css3 101
 
Typography for WordPress
Typography for WordPressTypography for WordPress
Typography for WordPress
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 

More from Four Kitchens

Four Kitchens Presents: Future of the CMS
Four Kitchens Presents: Future of the CMSFour Kitchens Presents: Future of the CMS
Four Kitchens Presents: Future of the CMSFour Kitchens
 
Four Kitchens: We make BIG websites
Four Kitchens: We make BIG websitesFour Kitchens: We make BIG websites
Four Kitchens: We make BIG websitesFour Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)
Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)
Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)Four Kitchens
 
No RFPs! Why requests for proposal are bad for business (and how we can stop ...
No RFPs! Why requests for proposal are bad for business (and how we can stop ...No RFPs! Why requests for proposal are bad for business (and how we can stop ...
No RFPs! Why requests for proposal are bad for business (and how we can stop ...Four Kitchens
 
Big Websites for Small Screens: ICANN.org Case Study
Big Websites for Small Screens: ICANN.org Case StudyBig Websites for Small Screens: ICANN.org Case Study
Big Websites for Small Screens: ICANN.org Case StudyFour Kitchens
 
UX design for every screen
UX design for every screenUX design for every screen
UX design for every screenFour Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)
Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)
Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)Four Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)Four Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)Four Kitchens
 
Accelerated grid theming using NineSixty (DrupalCamp LA 2011)
Accelerated grid theming using NineSixty (DrupalCamp LA 2011)Accelerated grid theming using NineSixty (DrupalCamp LA 2011)
Accelerated grid theming using NineSixty (DrupalCamp LA 2011)Four Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)
Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)
Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)Four Kitchens
 
Building Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalBuilding Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalFour Kitchens
 
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)Four Kitchens
 
Designing future proof websites
Designing future proof websitesDesigning future proof websites
Designing future proof websitesFour Kitchens
 
The Web Chef Cookbook
The Web Chef CookbookThe Web Chef Cookbook
The Web Chef CookbookFour Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)Four Kitchens
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)Four Kitchens
 

More from Four Kitchens (20)

Four Kitchens Presents: Future of the CMS
Four Kitchens Presents: Future of the CMSFour Kitchens Presents: Future of the CMS
Four Kitchens Presents: Future of the CMS
 
Four Kitchens: We make BIG websites
Four Kitchens: We make BIG websitesFour Kitchens: We make BIG websites
Four Kitchens: We make BIG websites
 
Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)
Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)
Don't Design Websites. Design Web SYSTEMS! (UT Austin Drupal Users Group)
 
No RFPs! Why requests for proposal are bad for business (and how we can stop ...
No RFPs! Why requests for proposal are bad for business (and how we can stop ...No RFPs! Why requests for proposal are bad for business (and how we can stop ...
No RFPs! Why requests for proposal are bad for business (and how we can stop ...
 
Big Websites for Small Screens: ICANN.org Case Study
Big Websites for Small Screens: ICANN.org Case StudyBig Websites for Small Screens: ICANN.org Case Study
Big Websites for Small Screens: ICANN.org Case Study
 
UX design for every screen
UX design for every screenUX design for every screen
UX design for every screen
 
Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)
Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)
Don't Design Websites. Design Web SYSTEMS! (BADCamp 2011)
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon London 2011)
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp LA 2011)
 
Accelerated grid theming using NineSixty (DrupalCamp LA 2011)
Accelerated grid theming using NineSixty (DrupalCamp LA 2011)Accelerated grid theming using NineSixty (DrupalCamp LA 2011)
Accelerated grid theming using NineSixty (DrupalCamp LA 2011)
 
Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)
Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)
Don't Design Websites. Design Web SYSTEMS! (Dallas Drupal Days 2011)
 
Building Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with DrupalBuilding Responsive Websites and Apps with Drupal
Building Responsive Websites and Apps with Drupal
 
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
Accelerated grid theming using NineSixty (Dallas Drupal Days 2011)
 
Intro to Drush
Intro to DrushIntro to Drush
Intro to Drush
 
Teaching Drupal
Teaching DrupalTeaching Drupal
Teaching Drupal
 
Big Websites
Big WebsitesBig Websites
Big Websites
 
Designing future proof websites
Designing future proof websitesDesigning future proof websites
Designing future proof websites
 
The Web Chef Cookbook
The Web Chef CookbookThe Web Chef Cookbook
The Web Chef Cookbook
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCamp Stockholm 2011)
 
Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)
Don't Design Websites. Design Web SYSTEMS! (DrupalCon Chicago 2011)
 

Recently uploaded

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Making drupal beautiful with web fonts

  • 1. Making Drupal beautiful with web fonts Designing in the @font-face of danger Aaron Stanush Dallas Drupal Days – July 9, 2011
  • 2. A little bit of history
  • 3. It only took a decade • 1997: CSS2 introduces @font-face • IE4 supports @font-face • 2008: Safari 3.1 supports @font-face • 2009: Firefox 3.5 supports @font-face • 2010: Chrome 4 supports @font-face • iOS 4 supports TrueType • Firefox 3.6, Chrome 6, IE9 support WOFF • W3C publishes working draft for WOFF
  • 4. Before After • sIFR • Web fonts • Flash-based • CSS + Web font file • Liked by foundries • Hosted option • Hated by designers • WOFF = Security • Cufón • It’s just text • Javascript/JSON • Lightweight • Not trusted by foundries
  • 5. Then • Arial • Times • Georgia • Palatino • Trebuchet MS • Helvetica • Verdana • Courier New • Impact • Comic Sans
  • 9. The new web font ecosystem
  • 10. Foundries & Designers Fonts Museo Gotham Avenir Formats TTF WOFF EOT SVG @font-face Font hosting Self-hosted services
  • 11. Commerical fonts ‣ Foundries ‣ Hoefler Frere-Jones, FontFont, House Industries, EmType, exljbris, etc. ‣ Font stores ‣ FontShop.com ‣ MyFonts.com
  • 12. Web font licensing It’s complicated. Everybody has their own rules. webfonts.info/wiki/index.php?title=Web_fonts_licensing_overview
  • 13. Free and open source • Font Squirrel • fontsquirrel.com • Google Web Fonts • code.google.com/webfonts • League of Movable Type • theleagueofmovabletype.com • Lost Type Co-op • losttype.com
  • 14. SIL Open font license “ It means that you're allowed to use these fonts personally or commercially, as long as you credit the original creator, and if you made tweaks and changes to the typefaces, any new typefaces resulting from it should be licensed under the same terms. That way all our fonts and any new fonts resulting from them will always be open. http://scripts.sil.org/OFL theleagueofmoveabletype.com/manifesto
  • 15. Web font formats • Embedded OpenType (EOT) • Web Open Font Format (WOFF) • TrueType + DRM • W3C standard (soon) • Created by Microsoft • 40% smaller than TTF • TrueType (TTF) • Contains metadata • Standard desktop format • SVG • Used for iOS 3
  • 16. Why do we need all these crazy font formats? Credit: shoze.blogspot.com
  • 17. @font-face browser support Firefox 3.6+ Chrome 6+ IE 6-8 IE9 Safari 3.1+ iOS 4.2 Android 2.2 EOT • • TTF • • • • • SVG • • WOFF • • • webfonts.info/wiki/index.php?title=@font-face_browser_support
  • 18. @font-face kits • Multiple file types • EOT, WOFF, TTF, SVG, Cufon, HTML, CSS • Pre-built kits • fontsquirrel.com/fontface • Build your own • fontsquirrel.com/fontface/generator
  • 20. @font-face @font-face { font-family: Gotham; src: url('gotham.ttf'); }
  • 21. the real @font-face @font-face { font-family: 'Gotham'; src: url('gotham.eot') format('eot'), src: url('gotham.eot?#iefix') format('embedded-opentype'), url('gotham.woff') format('woff'), url('gotham.ttf') format('truetype'), url('gotham.svg#gotham') format('svg'); } fontspring.com/blog/further-hardening-of-the-bulletproof-syntax
  • 22. EOT: IE9 compatibility mode @font-face { font-family: 'Gotham'; src: url('gotham.eot') format('eot'), src: url('gotham.eot?#iefix') format('embedded-opentype'), url('gotham.woff') format('woff'), url('gotham.ttf') format('truetype'), url('gotham.svg#gotham') format('svg'); } IE9 compatibility mode
  • 23. EOT: IE6, 7, 8 @font-face { font-family: 'Gotham'; src: url('gotham.eot') format('eot'), src: url('gotham.eot?#iefix') format('embedded-opentype'), url('gotham.woff') format('woff'), url('gotham.ttf') format('truetype'), url('gotham.svg#gotham') format('svg'); } Unfortunately, you need the ?# to trick IE.
  • 24. WOFF: Chrome, Firefox, IE9 @font-face { font-family: 'Gotham'; src: url('gotham.eot') format('eot'), src: url('gotham.eot?#iefix') format('embedded-opentype'), url('gotham.woff') format('woff'), url('gotham.ttf') format('truetype'), url('gotham.svg#gotham') format('svg'); }
  • 25. TTF: iOS 4, legacy browsers @font-face { font-family: 'Gotham'; src: url('gotham.eot') format('eot'), src: url('gotham.eot?#iefix') format('embedded-opentype'), url('gotham.woff') format('woff'), url('gotham.ttf') format('truetype'), url('gotham.svg#gotham') format('svg'); }
  • 26. SVG: iOS 3 @font-face { font-family: 'Gotham'; src: url('gotham.eot') format('eot'), src: url('gotham.eot?#iefix') format('embedded-opentype'), url('gotham.woff') format('woff'), url('gotham.ttf') format('truetype'), url('gotham.svg#gotham') format('svg'); } If the # value was not provided for you, open the SVG file in a text editor and look for: font id="mySVGFontName"
  • 27. The joy of multiple weights
  • 28. Bold and non-bold. Hooray. Verdana Verdana bold Verdana italic Verdana bold italic @h1 { font-family: Verdana; font-weight: bold; } @h2 { font-family: Verdana; font-weight: normal; }
  • 29. Real fonts have big families Gotham Light Gotham Light Italic Gotham Book Gotham Book Italic Gotham Medium Gotham Medium Italic Gotham Bold Gotham Bold Italic Gotham Black Gotham Black Italic
  • 30. Variant font-weight font-style Gotham Light 100 normal Gotham Light Italic 100 italic Gotham Book 200 normal Gotham Book Italic 200 italic Gotham Medium 300 normal Gotham Medium Italic 300 italic Gotham Bold 400 normal Gotham Bold Italic 400 italic Gotham Black 500 normal Gotham Black Italic 500 italic
  • 31. You can apply the same font-family name to each variant, as long as you set the font-weight and font-style for each.
  • 32. Calling each font by name. Eh. @font-face { font-family: ‘Gotham Light’; src: url('gotham-light.ttf') format('truetype'); font-weight: 100; } h2 { font-family: ‘Gotham Light’; }
  • 33. One family, many weights. Boom. @font-face { font-family: ‘Gotham’; src: url('gotham-light.ttf') format('truetype'); font-weight: 100; } @font-face { font-family: ‘Gotham’; src: url('gotham-black.ttf') format('truetype'); font-weight: 500; } h1 { /* Gotham Black */ h2 { /* Gotham Light */ font-family: ‘Gotham’; font-family: ‘Gotham’; font-weight: 500; font-weight: 100; } } 456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple
  • 34. Italics too @font-face { font-family: ‘Gotham’; src: url('gotham-light-italic.ttf') format('truetype'); font-weight: 100; font-style: italic; } .caption { font-family: ‘Gotham’; font-weight: 100; font-style: italic; } 456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple
  • 36. Web font hosting • Pros • Cons • Large selection of • Not free: Pay by high-quality fonts pageviews or per font • Very little coding • No desktop version • No worrying about of the font licensing • Dependent on third- • No expensive font party service purchases
  • 37. Web font hosting services • Paid • Free • Typekit.com • google.com/ webfonts • webfonts.fonts.com • Fontdeck.com • Kernest.com
  • 39. Web fonts in Drupal
  • 40. @font-your-face module • Supports multiple font-hosting services • No Javascript to add to your templates • Browse font collection inside Drupal • Assign CSS selectors through the UI drupal.org/projects/font-your-face
  • 42. Best practices • Only load the fonts you need • Always use fallback fonts • FOUT - Flash of Unstyled Text • Font events • Test, test, test
  • 45. Aaron Stanush aaron@fourkitchens.com @aaronstanush fourkitchens.com/presentations slideshare.net/fourkitchens
  • 46. Thanks! All content in this presentation, except where noted otherwise, is Creative Commons Attribution- ShareAlike 3.0 licensed and copyright 2009 Four Kitchen Studios, LLC.