SlideShare une entreprise Scribd logo
1  sur  37
What is @font-face?


• CSS2 rule
• Allows embedding of fonts through
  css

• Access hosted fonts instead of
  relying on user’s installed fonts
What’s the big deal?

• Rely on native browser rendering,
  the same as with web safe fonts

• Cufon/sifr great but css support is
  incomplete, plus relies on javascript

• It’s easy
• Print stylesheets work with @font-
  face
Can we use it?
colamovies.com
   28,766 Visitors
midlandsbiz.com
   10,253 Visitors
unmatchedstyle.com
     35,400 Visitors
With great power comes
  great responsibility


• @font-face makes knowledge of
  typography even more important

• great design has been done with
  only web-safe fonts
Not so fast!
So how do you do it?
@font-face {
    font-family: 'PTSansRegular';
    src: url('PT_Sans.eot');
    src: local('PT Sans Regular'), local('PTSans-Regular'),
         url('PT_Sans.woff') format('woff'),
         url('PT_Sans.ttf') format('truetype'),
         url('PT_Sans.svg#PTSans-Regular') format('svg');
}




p {

      font-family: "PTSansRegular", Helvetica, Arial, sans-serif;

}




           Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
So how do you do it?
@font-face {
    font-family: 'PTSansRegular';
    src: url('PT_Sans.eot');
    src: local('PT Sans Regular'), local('PTSans-Regular'),
         url('PT_Sans.woff') format('woff'),
         url('PT_Sans.ttf') format('truetype'),
         url('PT_Sans.svg#PTSans-Regular') format('svg');
}




p {

      font-family: "PTSansRegular", Helvetica, Arial, sans-serif;

}




           Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
So how do you do it?
@font-face {
    font-family: 'PTSansRegular';
    src: url('PT_Sans.eot');
    src: local('PT Sans Regular'), local('PTSans-Regular'),
         url('PT_Sans.woff') format('woff'),
         url('PT_Sans.ttf') format('truetype'),
         url('PT_Sans.svg#PTSans-Regular') format('svg');
}




p {

      font-family: "PTSansRegular", Helvetica, Arial, sans-serif;

}




           Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
So how do you do it?
@font-face {
    font-family: 'PTSansRegular';
    src: url('PT_Sans.eot');
    src: local('PT Sans Regular'), local('PTSans-Regular'),
         url('PT_Sans.woff') format('woff'),
         url('PT_Sans.ttf') format('truetype'),
         url('PT_Sans.svg#PTSans-Regular') format('svg');
}




p {

      font-family: "PTSansRegular", Helvetica, Arial, sans-serif;

}




           Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
So how do you do it?
@font-face {
    font-family: 'PTSansRegular';
    src: url('PT_Sans.eot');
    src: local('PT Sans Regular'), local('PTSans-Regular'),
         url('PT_Sans.woff') format('woff'),
         url('PT_Sans.ttf') format('truetype'),
         url('PT_Sans.svg#PTSans-Regular') format('svg');
}




p {

      font-family: "PTSansRegular", Helvetica, Arial, sans-serif;

}




           Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
So how do you do it?
@font-face {
    font-family: 'PTSansRegular';
    src: url('PT_Sans.eot');
    src: local('PT Sans Regular'), local('PTSans-Regular'),
         url('PT_Sans.woff') format('woff'),
         url('PT_Sans.ttf') format('truetype'),
         url('PT_Sans.svg#PTSans-Regular') format('svg');
}




p {

      font-family: "PTSansRegular", Helvetica, Arial, sans-serif;

}




           Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
Licensing

• Make sure you own a license for
  font

• Read the EULA from each foundry.
• Take precautions to secure the
  font from download

• Typekit fills a void
Browser Differences
      Firefox Mac          IE/FF XP with Cleartype




Firefox XP w/o Cleartype     IE6 w/o Cleartype
IE Jaggy Fix
p {

      filter: alpha(opacity=100);
      -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";

}
IE Jaggy Fix
p {

      filter: alpha(opacity=100);
      -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";

}
FOUT


• Flash of
  unstyled
  text

• Webkit
  hides font
Fighting the FOUT

• place css at top so it loads first
• use Paul Irish embed method
• use server side compression to
  serve files (zip/gzip)

• base64 encode ttf/otf fonts
• subset fonts to reduce file size
Without base64 encoding
Without base64 encoding
Without base64 encoding
Without base64 encoding
With base64 encoding
With base64 encoding
With base64 encoding
Fighting the FOUT

• place css at top so it loads first
• use Paul Irish embed method
• use server side compression to serve
  files

• base64 encode ttf/otf fonts
• subset fonts to reduce file size
Subset Fonts
fontsquirrel @font-face generator




 http://www.fontsquirrel.com/fontface/generator
Use correct font for styles
h1, strong {

       font-weight: normal;
       font-family: "PTSansBold", Helvetica, Arial, sans-serif;

}

em {

       font-style: normal;
       font-family: "PTSansItalic", Helvetica, Arial, sans-serif;

}




       • Webkit interprets correctly, other
          browsers not so much
My @font-face site: petridisc.com

       Resources & Tools
          fontsquirrel.com
           webfonts.info
            paulirish.com
             typekit.com
        webfontspecimen.com




 Get crackin’.

Contenu connexe

En vedette

15 Talking Typefaces: What Your Font Choice Really Means
15 Talking Typefaces: What Your Font Choice Really Means15 Talking Typefaces: What Your Font Choice Really Means
15 Talking Typefaces: What Your Font Choice Really Means97th Floor
 
Newstyleguide 2013 forms_updated
Newstyleguide 2013 forms_updatedNewstyleguide 2013 forms_updated
Newstyleguide 2013 forms_updatedAlyssa Richards
 
6 Strategies for Presenting Data & Charts
6 Strategies for Presenting Data & Charts6 Strategies for Presenting Data & Charts
6 Strategies for Presenting Data & ChartsMGT OPEN
 
Creating Charts for Presentations
Creating Charts for PresentationsCreating Charts for Presentations
Creating Charts for PresentationsVisually
 
Types Of Charts
Types Of ChartsTypes Of Charts
Types Of Chartswmassie
 
The Things I Carry
The Things I Carry The Things I Carry
The Things I Carry Chiara Ojeda
 
The State of Financial Presentations 2014 Survey Results
The State of Financial Presentations 2014 Survey ResultsThe State of Financial Presentations 2014 Survey Results
The State of Financial Presentations 2014 Survey ResultsDave Paradi
 
5 Secrets to Better Presentation Charts and Graphs
5 Secrets to Better Presentation Charts and Graphs5 Secrets to Better Presentation Charts and Graphs
5 Secrets to Better Presentation Charts and GraphsMetamorph Training Pvt Ltd
 
120 Awesome Marketing Stats, Charts and Graphs
120 Awesome Marketing Stats, Charts and Graphs120 Awesome Marketing Stats, Charts and Graphs
120 Awesome Marketing Stats, Charts and GraphsHubSpot
 
How to Present Data in PowerPoint
How to Present Data in PowerPointHow to Present Data in PowerPoint
How to Present Data in PowerPointMatt Hunter
 
Visual Data Representation Techniques Combining Art and Design
Visual Data Representation Techniques Combining Art and DesignVisual Data Representation Techniques Combining Art and Design
Visual Data Representation Techniques Combining Art and DesignLogo Design Guru
 
7 tips to create visual presentations
7 tips to create visual presentations7 tips to create visual presentations
7 tips to create visual presentationsEmiland
 
How to Write Clickass Presentations that Convert
How to Write Clickass Presentations that ConvertHow to Write Clickass Presentations that Convert
How to Write Clickass Presentations that ConvertBarry Feldman
 
Zombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesikZombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesikEric Pesik
 
THE PRESENTATION DESIGN CRASH COURSE
THE PRESENTATION DESIGN CRASH COURSETHE PRESENTATION DESIGN CRASH COURSE
THE PRESENTATION DESIGN CRASH COURSEJoseph Gelman
 
7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenecEugene Cheng
 
SlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
SlideShare Experts - 7 Experts Reveal Their Presentation Design SecretsSlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
SlideShare Experts - 7 Experts Reveal Their Presentation Design SecretsEugene Cheng
 

En vedette (20)

15 Talking Typefaces: What Your Font Choice Really Means
15 Talking Typefaces: What Your Font Choice Really Means15 Talking Typefaces: What Your Font Choice Really Means
15 Talking Typefaces: What Your Font Choice Really Means
 
Newstyleguide 2013 forms_updated
Newstyleguide 2013 forms_updatedNewstyleguide 2013 forms_updated
Newstyleguide 2013 forms_updated
 
6 Strategies for Presenting Data & Charts
6 Strategies for Presenting Data & Charts6 Strategies for Presenting Data & Charts
6 Strategies for Presenting Data & Charts
 
Creating Charts for Presentations
Creating Charts for PresentationsCreating Charts for Presentations
Creating Charts for Presentations
 
PIE CHART
PIE CHARTPIE CHART
PIE CHART
 
Types Of Charts
Types Of ChartsTypes Of Charts
Types Of Charts
 
The Things I Carry
The Things I Carry The Things I Carry
The Things I Carry
 
Charts And Graphs
Charts And GraphsCharts And Graphs
Charts And Graphs
 
The State of Financial Presentations 2014 Survey Results
The State of Financial Presentations 2014 Survey ResultsThe State of Financial Presentations 2014 Survey Results
The State of Financial Presentations 2014 Survey Results
 
10 Ways to be a Marketing Genius Like Lady Gaga
10 Ways to be a Marketing Genius Like Lady Gaga10 Ways to be a Marketing Genius Like Lady Gaga
10 Ways to be a Marketing Genius Like Lady Gaga
 
5 Secrets to Better Presentation Charts and Graphs
5 Secrets to Better Presentation Charts and Graphs5 Secrets to Better Presentation Charts and Graphs
5 Secrets to Better Presentation Charts and Graphs
 
120 Awesome Marketing Stats, Charts and Graphs
120 Awesome Marketing Stats, Charts and Graphs120 Awesome Marketing Stats, Charts and Graphs
120 Awesome Marketing Stats, Charts and Graphs
 
How to Present Data in PowerPoint
How to Present Data in PowerPointHow to Present Data in PowerPoint
How to Present Data in PowerPoint
 
Visual Data Representation Techniques Combining Art and Design
Visual Data Representation Techniques Combining Art and DesignVisual Data Representation Techniques Combining Art and Design
Visual Data Representation Techniques Combining Art and Design
 
7 tips to create visual presentations
7 tips to create visual presentations7 tips to create visual presentations
7 tips to create visual presentations
 
How to Write Clickass Presentations that Convert
How to Write Clickass Presentations that ConvertHow to Write Clickass Presentations that Convert
How to Write Clickass Presentations that Convert
 
Zombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesikZombie PowerPoint by @ericpesik
Zombie PowerPoint by @ericpesik
 
THE PRESENTATION DESIGN CRASH COURSE
THE PRESENTATION DESIGN CRASH COURSETHE PRESENTATION DESIGN CRASH COURSE
THE PRESENTATION DESIGN CRASH COURSE
 
7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec
 
SlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
SlideShare Experts - 7 Experts Reveal Their Presentation Design SecretsSlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
SlideShare Experts - 7 Experts Reveal Their Presentation Design Secrets
 

Similaire à What the @font-face

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 Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?Greg Veen
 
Employing Custom Fonts
Employing Custom FontsEmploying Custom Fonts
Employing Custom FontsPaul Irish
 
Implementing @font-face
Implementing @font-faceImplementing @font-face
Implementing @font-faceAban Nesta
 
CSS @font-face : Personalized fonts
CSS @font-face : Personalized fontsCSS @font-face : Personalized fonts
CSS @font-face : Personalized fontsYves Van Goethem
 
Web Typography Tips
Web Typography TipsWeb Typography Tips
Web Typography TipsSara Cannon
 
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
 
New Web Typography
New Web TypographyNew Web Typography
New Web TypographyMonotype
 
How do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksHow do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksCompare Infobase Limited
 
Mix10 final snook_ds15
Mix10 final snook_ds15Mix10 final snook_ds15
Mix10 final snook_ds15Jonathan Snook
 
The Type We Want (MIX10)
The Type We Want (MIX10)The Type We Want (MIX10)
The Type We Want (MIX10)Jonathan Snook
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglKilian Valkhof
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 WorkshopChristopher Schmitt
 
Typography for WordPress
Typography for WordPressTypography for WordPress
Typography for WordPressNile Flores
 
Why CSS Was Invented (Håkon Wium Lie)
Why CSS Was Invented (Håkon Wium Lie)Why CSS Was Invented (Håkon Wium Lie)
Why CSS Was Invented (Håkon Wium Lie)Future Insights
 

Similaire à What the @font-face (20)

Making drupal beautiful with web fonts
Making drupal beautiful with web fontsMaking drupal beautiful with web fonts
Making drupal beautiful with web fonts
 
Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?
 
Employing Custom Fonts
Employing Custom FontsEmploying Custom Fonts
Employing Custom Fonts
 
Implementing @font-face
Implementing @font-faceImplementing @font-face
Implementing @font-face
 
CSS @font-face : Personalized fonts
CSS @font-face : Personalized fontsCSS @font-face : Personalized fonts
CSS @font-face : Personalized fonts
 
The State of Web Type
The State of Web TypeThe State of Web Type
The State of Web Type
 
new fonts for the web
new fonts for the webnew fonts for the web
new fonts for the web
 
Web Typography Tips
Web Typography TipsWeb Typography Tips
Web Typography Tips
 
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
 
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
 
How do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksHow do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML Tricks
 
Mix10 final snook_ds15
Mix10 final snook_ds15Mix10 final snook_ds15
Mix10 final snook_ds15
 
The Type We Want (MIX10)
The Type We Want (MIX10)The Type We Want (MIX10)
The Type We Want (MIX10)
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webgl
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
Typography for WordPress
Typography for WordPressTypography for WordPress
Typography for WordPress
 
[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover
 
Why CSS Was Invented (Håkon Wium Lie)
Why CSS Was Invented (Håkon Wium Lie)Why CSS Was Invented (Håkon Wium Lie)
Why CSS Was Invented (Håkon Wium Lie)
 

Dernier

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Dernier (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

What the @font-face

  • 1.
  • 2.
  • 3.
  • 4. What is @font-face? • CSS2 rule • Allows embedding of fonts through css • Access hosted fonts instead of relying on user’s installed fonts
  • 5. What’s the big deal? • Rely on native browser rendering, the same as with web safe fonts • Cufon/sifr great but css support is incomplete, plus relies on javascript • It’s easy • Print stylesheets work with @font- face
  • 7. colamovies.com 28,766 Visitors
  • 8. midlandsbiz.com 10,253 Visitors
  • 9. unmatchedstyle.com 35,400 Visitors
  • 10. With great power comes great responsibility • @font-face makes knowledge of typography even more important • great design has been done with only web-safe fonts
  • 11.
  • 12.
  • 13.
  • 15. So how do you do it? @font-face { font-family: 'PTSansRegular'; src: url('PT_Sans.eot'); src: local('PT Sans Regular'), local('PTSans-Regular'), url('PT_Sans.woff') format('woff'), url('PT_Sans.ttf') format('truetype'), url('PT_Sans.svg#PTSans-Regular') format('svg'); } p { font-family: "PTSansRegular", Helvetica, Arial, sans-serif; } Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
  • 16. So how do you do it? @font-face { font-family: 'PTSansRegular'; src: url('PT_Sans.eot'); src: local('PT Sans Regular'), local('PTSans-Regular'), url('PT_Sans.woff') format('woff'), url('PT_Sans.ttf') format('truetype'), url('PT_Sans.svg#PTSans-Regular') format('svg'); } p { font-family: "PTSansRegular", Helvetica, Arial, sans-serif; } Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
  • 17. So how do you do it? @font-face { font-family: 'PTSansRegular'; src: url('PT_Sans.eot'); src: local('PT Sans Regular'), local('PTSans-Regular'), url('PT_Sans.woff') format('woff'), url('PT_Sans.ttf') format('truetype'), url('PT_Sans.svg#PTSans-Regular') format('svg'); } p { font-family: "PTSansRegular", Helvetica, Arial, sans-serif; } Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
  • 18. So how do you do it? @font-face { font-family: 'PTSansRegular'; src: url('PT_Sans.eot'); src: local('PT Sans Regular'), local('PTSans-Regular'), url('PT_Sans.woff') format('woff'), url('PT_Sans.ttf') format('truetype'), url('PT_Sans.svg#PTSans-Regular') format('svg'); } p { font-family: "PTSansRegular", Helvetica, Arial, sans-serif; } Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
  • 19. So how do you do it? @font-face { font-family: 'PTSansRegular'; src: url('PT_Sans.eot'); src: local('PT Sans Regular'), local('PTSans-Regular'), url('PT_Sans.woff') format('woff'), url('PT_Sans.ttf') format('truetype'), url('PT_Sans.svg#PTSans-Regular') format('svg'); } p { font-family: "PTSansRegular", Helvetica, Arial, sans-serif; } Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
  • 20. So how do you do it? @font-face { font-family: 'PTSansRegular'; src: url('PT_Sans.eot'); src: local('PT Sans Regular'), local('PTSans-Regular'), url('PT_Sans.woff') format('woff'), url('PT_Sans.ttf') format('truetype'), url('PT_Sans.svg#PTSans-Regular') format('svg'); } p { font-family: "PTSansRegular", Helvetica, Arial, sans-serif; } Based on: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/
  • 21. Licensing • Make sure you own a license for font • Read the EULA from each foundry. • Take precautions to secure the font from download • Typekit fills a void
  • 22. Browser Differences Firefox Mac IE/FF XP with Cleartype Firefox XP w/o Cleartype IE6 w/o Cleartype
  • 23. IE Jaggy Fix p { filter: alpha(opacity=100); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; }
  • 24. IE Jaggy Fix p { filter: alpha(opacity=100); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; }
  • 25. FOUT • Flash of unstyled text • Webkit hides font
  • 26. Fighting the FOUT • place css at top so it loads first • use Paul Irish embed method • use server side compression to serve files (zip/gzip) • base64 encode ttf/otf fonts • subset fonts to reduce file size
  • 34. Fighting the FOUT • place css at top so it loads first • use Paul Irish embed method • use server side compression to serve files • base64 encode ttf/otf fonts • subset fonts to reduce file size
  • 35. Subset Fonts fontsquirrel @font-face generator http://www.fontsquirrel.com/fontface/generator
  • 36. Use correct font for styles h1, strong { font-weight: normal; font-family: "PTSansBold", Helvetica, Arial, sans-serif; } em { font-style: normal; font-family: "PTSansItalic", Helvetica, Arial, sans-serif; } • Webkit interprets correctly, other browsers not so much
  • 37. My @font-face site: petridisc.com Resources & Tools fontsquirrel.com webfonts.info paulirish.com typekit.com webfontspecimen.com Get crackin’.

Notes de l'éditeur

  1. CSS2 finished in 1998
  2. <font> - let you figure that one out images - hard to maintain, not as accessible, potentially large web fonts - limited # of fonts, but the way it’s done today, in conjunction with cufon
  3. FF3 released 6/08, FF 3.5 released 6/09, matter of months will be smaller. Chrome is growing, but new installs will support. Seems to have slower uptake. Is it a client site or personal? Who is the audience? Will your client understand if things don’t look exactly the same everywhere?
  4. colamovies jan 2010. Important to look at your stats.
  5. colamovies jan 2010. Important to look at your stats.
  6. colamovies jan 2010. Important to look at your stats.