Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem with using a custom font for icons is that you've got no backup plan if:</p> <ul> <li>Your user's browser is too old to support <code>@font-face</code></li> <li>The user agent isn't your traditional browser (eg. Screen readers for the blind, search engines, HTML-to-text converters, etc.)</li> <li>The user copy-pastes the text containing the "icon" into something that discards rich formatting information or doesn't have the font in question.</li> <li>The user agent will never support <code>@font-face</code> (Eg. Textual web browsers like Lynx, Links2, and ELinks for Unix/Linux)</li> <li>The user is behind a corporate proxy that discards or mangles headers that your browser demands before displaying custom fonts. (more common than you think)</li> <li>The user is running NoScript with the default font-blocking behaviour enabled to protect against 0-day exploits in the font engine.</li> </ul> <p>Images provide the <code>alt</code> attribute for just this reason.</p> <p>However, if you're going to use a font for icons, make sure you store your glyphs in a Unicode <a href="http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Private_use_characters" rel="nofollow noreferrer">Private Use Area</a>. That'll mitigate the problem a bit by ensuring there's probably no conflict (Companies can and do sometimes use PUA glyphs to store custom data) and, if they're coded smartly, screen readers could know to gracefully ignore PUA glyphs.</p> <p>As for implementing a fallback, I'd suggest using <a href="http://www.modernizr.com/" rel="nofollow noreferrer">Modernizr</a> (specifically, <a href="http://www.modernizr.com/docs/#fontface" rel="nofollow noreferrer">Modernizr.fontface</a>) to test for support.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload