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

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
#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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Dernier (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
#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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

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.