SlideShare una empresa de Scribd logo
1 de 20
Using webfont-based
glyphs in your Joomla!™
website
Tips and resources available for creating glyphs on your
website
Using webfont-based glyphs in your Joomla!™
website
What are glyphs and where
did they come from
Font-based glyphs in HTML
What are “safe” fonts
The magic of CSS3 and
webfont-based glyphs
A practical demonstration Ancient Maya glyph for Day 10 of the tzolkin calendar
What are glyphs
The Macquarie Dictionary
defines glyph
 Archaeology—a pictograph
or hieroglyph
Wikipedia defines glyph
 Typography—an elemental
symbol within an agreed set
of symbols, intended to
represent a readable
character for the purposes of
writing and thereby
expressing thoughts, ideas
and concepts.
Glyphs and icons
Glyphs are like icons
 Most icons used on websites
are based on images
 Most glyphs used on websites
are created using fonts
Glyph usage originated via the
<FONT FACE="... ">
HTML attribute
Example:
<FONT FACE="Webdings">i</FONT>
Icon usage (as images)
originated via the <IMG
SRC="URL" /> HTML tag
JPEGs, GIFs, PNGs
Different image
formats
 JPEG – full colour but
no transparency
 GIF – transparent, 256
colours + transparency
 PNG – full colour +
transparency
 Depending on browser
support, you can also
BMP, SVG and some
other formats
Problems with using images:
■ Each image has to be stored as a separate file.
■ Images have to be downloaded when the page is loaded. If you have lots
of images this adds to the time it takes before the page is rendered.
■ If the image is not available or it takes too long to get the file, the image is
replaced by the “red X” placeholder.
■ Antialiasing (particularly noticeable on dark backgrounds) issues.
■ Scaleability versus quality.
■ If you don’t have the images, you have to spend time finding them and
make sure that you don’t run into copyright/ownership problems.
Browser support for different image formats
Once upon a time …
… you could use the <FONT FACE="... "> HTML
tag
 HTML5 changed all that
 Before HTML4, the web browser relied on fonts
installed on user’s computer
 From HTML4, the <FONT> tag was deprecated
 HTML5 relies on CSS and “safe” fonts
So ...
Where have all
the “cute” fonts
gone?
Why can’t I use
Webdings,
Wingdings or
ZapfDingbats?
Unicode character set
The Unicode Standard covers (almost) all the
characters, punctuations, and symbols in the
world.
Unicode enables processing, storage, and
transport of text, independent of platform and
language.
See also
 http://www.w3schools.com/charsets/
 http://unicode-table.com/en/#miscellaneous-symbols
Glyphs created with “safe” fonts
For example, you could display the “envelope”
character (U2709) like this
<style>
p.envelope:before {
content: '2709';
}
</style>
<p class="envelope">
<a href="mailto:testing@test.com">Email me</a>
</p>
... and this would probably look
like
Glyphs created with HTML entities
Another way of displaying the “envelope” character
(U2709) is this
<p>&#x2709;
<a href="mailto:testing@test.com">Email me</a>
</p>
Not all characters are available in all the so-called
“safe” fonts
A complete list of CSS safe fonts
Sans-serif
 Arial, Arial Black, Arial Narrow, Arial Rounded MT Bold, Avant Garde, Calibri,
Candara, Century Gothic, Franklin Gothic Medium, Futura, Geneva, Gill Sans,
Helvetica, Impact, Lucida Grande, Optima, Segoe UI, Tahoma, Trebuchet MS,
Verdana
Serif
 Baskerville, Big Caslon, Bodoni MT, Book Antiqua, Calisto MT, Cambria, Didot,
Garamond, Georgia, Goudy Old Style, Hoefler Text, Lucida Bright, Palatino,
Perpetua, Rockwell, Rockwell Extra Bold, Times New Roman
Monospaced
 Andale Mono, Consolas, Courier New, Lucida Console, Lucida Sans Typewriter,
Monaco
Fantasy
 Copperplate
Script
 Brush Script MT
Examples of different uses of font-
family
“Safe” font-based glyphs issues
Your users may not have all fonts referenced on
your site.
Limitations of the CSS font-family rule fallback.
Character set limitations within the so-called “safe”
fonts.
What if you want to use “other” fonts?
How to employ webfonts
With the @font-face
CSS rule, web
designers no longer
have to use the “safe”
fonts.
Syntax
 @font-face
{
font-properties
}
It is a good idea to look at webfont
developers’ websites for examples of how
they recommend using the @font-face
CSS rule
Browser support for webfonts
Examples of webfonts used as
glyphs
Character-based
glyphs require the use
of downloadable
webfonts
Examples of
webfonts/font-families
used as glyphs:
 IcoMoon,
FontAwesome,
Glyphicons Halflings
IcoMoon is used by Joomla (in the
Hathor adminstrator template) and
available from http://icomoon.io/
FontAwesome is available from
http://fortawesome.github.io/Font-
Awesome/
Glyphicons Halflings is available from
http://glyphicons.com/
Sample characters in Glyphicons
Halflings
What you need for webfonts
The webfont source files
The CSS rule to load the fonts
A bit of imagination and creativity ... and some
patience
Copy the font files to your
website
Copy the webfont file(s) to your site
 Remember the /path
 You may have to copy different formats of the font,
e.g.
 WOFF
 TTF
 EOT
 SVG
CSS rule to create the Glyphicons
Halflings font
Add the following rule to your Joomla site template
CSS file (or to a custom CSS file, if you have one):
@font-face {
font-family: 'Glyphicons Halflings';
src: url(‘path/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
url('path/glyphicons-halflings-regular.woff') format('woff'),
url('path/glyphicons-halflings-regular.ttf') format('truetype'),
url('path/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}

Más contenido relacionado

Similar a Using webfont-based glyphs in Joomla

Typography for WordPress
Typography for WordPressTypography for WordPress
Typography for WordPressNile Flores
 
A Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI DeveloperA Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI Developernariyaravi
 
Fonts on the Web - a guide to web fonts
Fonts on the Web - a guide to web fontsFonts on the Web - a guide to web fonts
Fonts on the Web - a guide to web fontsPrototype Interactive
 
Drupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for DrupalDrupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for DrupalAshok Modi
 
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
 
Hooray Icon Fonts!
Hooray Icon Fonts!Hooray Icon Fonts!
Hooray Icon Fonts!jameswillweb
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationSudhir Yadav
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationSudhir Yadav
 
Webfonts: Demystified
Webfonts: DemystifiedWebfonts: Demystified
Webfonts: DemystifiedMel Choyce
 
Hooray Icon Fonts workshop
Hooray Icon Fonts workshopHooray Icon Fonts workshop
Hooray Icon Fonts workshopjameswillweb
 
Worry free web development
Worry free web developmentWorry free web development
Worry free web developmentEstelle Weyl
 
Hooray Icon Fonts! Artifact Conference
Hooray Icon Fonts! Artifact ConferenceHooray Icon Fonts! Artifact Conference
Hooray Icon Fonts! Artifact Conferencejameswillweb
 
Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2elliotjaystocks
 
Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?Greg Veen
 

Similar a Using webfont-based glyphs in Joomla (20)

Typography for WordPress
Typography for WordPressTypography for WordPress
Typography for WordPress
 
15 metaphor typography
15 metaphor typography15 metaphor typography
15 metaphor typography
 
The State of Web Type
The State of Web TypeThe State of Web Type
The State of Web Type
 
A Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI DeveloperA Complete Guide to Frontend - UI Developer
A Complete Guide to Frontend - UI Developer
 
Fonts on the Web - a guide to web fonts
Fonts on the Web - a guide to web fontsFonts on the Web - a guide to web fonts
Fonts on the Web - a guide to web fonts
 
Drupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for DrupalDrupal Camp LA 2011: Typography modules for Drupal
Drupal Camp LA 2011: Typography modules for Drupal
 
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 Trouble With Type
The Trouble With TypeThe Trouble With Type
The Trouble With Type
 
Hooray Icon Fonts!
Hooray Icon Fonts!Hooray Icon Fonts!
Hooray Icon Fonts!
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
Webfonts: Demystified
Webfonts: DemystifiedWebfonts: Demystified
Webfonts: Demystified
 
Hooray Icon Fonts workshop
Hooray Icon Fonts workshopHooray Icon Fonts workshop
Hooray Icon Fonts workshop
 
Web Typography
Web TypographyWeb Typography
Web Typography
 
WEB and FONTS
WEB and FONTSWEB and FONTS
WEB and FONTS
 
Worry free web development
Worry free web developmentWorry free web development
Worry free web development
 
Hooray Icon Fonts! Artifact Conference
Hooray Icon Fonts! Artifact ConferenceHooray Icon Fonts! Artifact Conference
Hooray Icon Fonts! Artifact Conference
 
Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2Progressive Enhancement & Intentional Degradation 2
Progressive Enhancement & Intentional Degradation 2
 
Web Fonts: Why Bother?
Web Fonts: Why Bother?Web Fonts: Why Bother?
Web Fonts: Why Bother?
 

Último

『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 

Último (20)

『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 

Using webfont-based glyphs in Joomla

  • 1. Using webfont-based glyphs in your Joomla!™ website Tips and resources available for creating glyphs on your website
  • 2. Using webfont-based glyphs in your Joomla!™ website What are glyphs and where did they come from Font-based glyphs in HTML What are “safe” fonts The magic of CSS3 and webfont-based glyphs A practical demonstration Ancient Maya glyph for Day 10 of the tzolkin calendar
  • 3. What are glyphs The Macquarie Dictionary defines glyph  Archaeology—a pictograph or hieroglyph Wikipedia defines glyph  Typography—an elemental symbol within an agreed set of symbols, intended to represent a readable character for the purposes of writing and thereby expressing thoughts, ideas and concepts.
  • 4. Glyphs and icons Glyphs are like icons  Most icons used on websites are based on images  Most glyphs used on websites are created using fonts Glyph usage originated via the <FONT FACE="... "> HTML attribute Example: <FONT FACE="Webdings">i</FONT> Icon usage (as images) originated via the <IMG SRC="URL" /> HTML tag
  • 5. JPEGs, GIFs, PNGs Different image formats  JPEG – full colour but no transparency  GIF – transparent, 256 colours + transparency  PNG – full colour + transparency  Depending on browser support, you can also BMP, SVG and some other formats Problems with using images: ■ Each image has to be stored as a separate file. ■ Images have to be downloaded when the page is loaded. If you have lots of images this adds to the time it takes before the page is rendered. ■ If the image is not available or it takes too long to get the file, the image is replaced by the “red X” placeholder. ■ Antialiasing (particularly noticeable on dark backgrounds) issues. ■ Scaleability versus quality. ■ If you don’t have the images, you have to spend time finding them and make sure that you don’t run into copyright/ownership problems.
  • 6. Browser support for different image formats
  • 7. Once upon a time … … you could use the <FONT FACE="... "> HTML tag  HTML5 changed all that  Before HTML4, the web browser relied on fonts installed on user’s computer  From HTML4, the <FONT> tag was deprecated  HTML5 relies on CSS and “safe” fonts So ... Where have all the “cute” fonts gone? Why can’t I use Webdings, Wingdings or ZapfDingbats?
  • 8. Unicode character set The Unicode Standard covers (almost) all the characters, punctuations, and symbols in the world. Unicode enables processing, storage, and transport of text, independent of platform and language. See also  http://www.w3schools.com/charsets/  http://unicode-table.com/en/#miscellaneous-symbols
  • 9. Glyphs created with “safe” fonts For example, you could display the “envelope” character (U2709) like this <style> p.envelope:before { content: '2709'; } </style> <p class="envelope"> <a href="mailto:testing@test.com">Email me</a> </p> ... and this would probably look like
  • 10. Glyphs created with HTML entities Another way of displaying the “envelope” character (U2709) is this <p>&#x2709; <a href="mailto:testing@test.com">Email me</a> </p> Not all characters are available in all the so-called “safe” fonts
  • 11. A complete list of CSS safe fonts Sans-serif  Arial, Arial Black, Arial Narrow, Arial Rounded MT Bold, Avant Garde, Calibri, Candara, Century Gothic, Franklin Gothic Medium, Futura, Geneva, Gill Sans, Helvetica, Impact, Lucida Grande, Optima, Segoe UI, Tahoma, Trebuchet MS, Verdana Serif  Baskerville, Big Caslon, Bodoni MT, Book Antiqua, Calisto MT, Cambria, Didot, Garamond, Georgia, Goudy Old Style, Hoefler Text, Lucida Bright, Palatino, Perpetua, Rockwell, Rockwell Extra Bold, Times New Roman Monospaced  Andale Mono, Consolas, Courier New, Lucida Console, Lucida Sans Typewriter, Monaco Fantasy  Copperplate Script  Brush Script MT
  • 12. Examples of different uses of font- family
  • 13. “Safe” font-based glyphs issues Your users may not have all fonts referenced on your site. Limitations of the CSS font-family rule fallback. Character set limitations within the so-called “safe” fonts. What if you want to use “other” fonts?
  • 14. How to employ webfonts With the @font-face CSS rule, web designers no longer have to use the “safe” fonts. Syntax  @font-face { font-properties } It is a good idea to look at webfont developers’ websites for examples of how they recommend using the @font-face CSS rule
  • 16. Examples of webfonts used as glyphs Character-based glyphs require the use of downloadable webfonts Examples of webfonts/font-families used as glyphs:  IcoMoon, FontAwesome, Glyphicons Halflings IcoMoon is used by Joomla (in the Hathor adminstrator template) and available from http://icomoon.io/ FontAwesome is available from http://fortawesome.github.io/Font- Awesome/ Glyphicons Halflings is available from http://glyphicons.com/
  • 17. Sample characters in Glyphicons Halflings
  • 18. What you need for webfonts The webfont source files The CSS rule to load the fonts A bit of imagination and creativity ... and some patience
  • 19. Copy the font files to your website Copy the webfont file(s) to your site  Remember the /path  You may have to copy different formats of the font, e.g.  WOFF  TTF  EOT  SVG
  • 20. CSS rule to create the Glyphicons Halflings font Add the following rule to your Joomla site template CSS file (or to a custom CSS file, if you have one): @font-face { font-family: 'Glyphicons Halflings'; src: url(‘path/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('path/glyphicons-halflings-regular.woff') format('woff'), url('path/glyphicons-halflings-regular.ttf') format('truetype'), url('path/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); }

Notas del editor

  1. The dictionary definition of a glyph is “a pictograph or hieroglyph” … [C] … however, as you can see, a glyph has a slightly different meaning when related to typography
  2. Glyphs are like icons … [C] The use of images as icons originated with the implementation of the <IMG> HTML tag [C] The use of glyphs, on the other hand, started off with the use of the <FONT> HTML tag
  3. Not all browsers support all image formats
  4. To display an HTML page correctly, the browser must know what character set (character encoding) to use. For HTML5, the default character encoding is UTF-8. This has not always been the case. The character encoding for the early web was ASCII. Later, from HTML 2.0 to HTML 4.01, ISO-8859-1 was considered the standard. With XML and HTML5, UTF-8 finally arrived, and solved a lot of character encoding problems.
  5. Here’s another way of achieving the same result that we saw on the previous slide
  6. But, no matter how you look at it, an “envelope” (Unicode character 2709) still looks the same.
  7. Your users may not necessarily have all fonts referenced on your site. The CSS font-family rule offers a fallback capability if your users do not have the same fonts that you used when you designed your site, but their experience may be different and may suffer because of it. You are restricted when you use only the so-called “safe” fonts. If you want to use other fonts—instead of “safe” font ones—you are going to need something else. That’s where downloadable webfonts come into play.
  8. Not all browsers support all webfont formats Not all browsers support @font-face
  9. Here we see some of the characters available in Glyphicons Halflings