Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The ABCs of Web Typography

The ABCs of Web Typography

A class presented by General Assembly on the basics of web typography. The end of the classed showed real world usage and implementation of Google Fonts, Font Squirrel and IcoMoon.

James Coleman

January 28, 2015
Tweet

More Decks by James Coleman

Other Decks in Technology

Transcript

  1. James Craig, Designing With Type (1971) Reading a long line

    of type causes fatigue: the reader must move his head at the end of each line and search for the beginning of the next line.… Too short a line breaks up words or phrases that are generally read as a unit.
  2. MAKE BODY TEXT EASY TO READ • 45 to 85

    characters per line (including punctuation) • A line height somewhere between 125% and 150% of the font size. • A font size that is readable, depending on the environment.
  3. BODY FONT SIZE • Defaults to 16px in most browsers

    • Default could change in the future, especially on different devices like mobiles. • Set the base font size on the HTML element
  4. Jennifer Farley, New Relic There is no rule to cover

    tracking for every font. The best guideline is to use your eyes. Generally if the letters look like they’re too close together, they probably are. Lots of practice and experimentation is how you really learn to use tracking in your designs.
  5. UPPERCASE • More tiring and slower to read because it

    reduces recognition by making all letters a similar size. • Ensure uppercase is a style, not forced by copy: .element { text-transform: uppercase; }
  6. SLAB SERIF Ff Ff SLAB SERIF SERIF * slab serif

    is still technically a serif font
  7. USAGE STATISTICS SANS-SERIF SERIF HEADING 60% 40% BODY COPY 66%

    34% http:/ /www.webdesignerdepot.com/2013/03/serif-vs-sans-the-final-battle/
  8. MIX IT UP Ghostface Killah ! Dennis Coles (born May

    9, 1970), better known by his stage name Ghostface Killah, is an American rapper and prominent member of the Wu-Tang Clan. After the group achieved breakthrough success in the aftermath of Enter the Wu-Tang (36 Chambers), the members went on to pursue solo careers to varying levels of success. Ghostface Killah ! Dennis Coles (born May 9, 1970), better known by his stage name Ghostface Killah, is an American rapper and prominent member of the Wu-Tang Clan. After the group achieved breakthrough success in the aftermath of Enter the Wu-Tang (36 Chambers), the members went on to pursue solo careers to varying levels of success.
  9. NOTES ON FONT TYPES • Sans-serif is easier to read

    at smaller sizes (on screen) • Serif is easier to read at larger sizes • Many sans-serif fonts have been created specifically for electronic displays • Don’t use too many different styles (sans-serif, serif, slab serif at once) • It’s whatever you’d like!
  10. M

  11. EM • Flexible (grows with context) • Changes font size

    with zoom (on olddddd browsers) • You’ll die if you hate maths • It’s pretty complicated to keep track of
  12. REM

  13. REM • Still flexible (grows with top level context) •

    Less flexible to control specific areas of design • Doesn’t work on old browsers so who cares • Easy to keep track of
  14. Nerds, Mozilla Developer Network The font-family CSS property allows for

    a prioritized list of font family names and/or generic family names to be specified for the selected element. Unlike most other CSS properties, values are separated by a comma to indicate that they are alternatives.
  15. FONT FAMILIES .element { font-family: Arial, Helvetica Neue, Helvetica, sans-serif;

    } .element { font-family: Arial, “Helvetica Neue”, Helvetica, sans-serif; }
  16. Nerds, Mozilla Developer Network The @font-face CSS at-rule allows authors

    to specify online fonts to display text on their web pages.
  17. FONT FAMILIES .element { font-family: “Bitstream Vera”, Arial, Helvetica Neue,

    Helvetica, sans-serif; } ! @font-face { font-family: "Bitstream Vera"; src: url(“https://mdn.mozillademos.org/files/2468/ VeraSeBd.ttf”); }
  18. FONT FAMILIES .element { font-family: “Bitstream Vera”, Arial, Helvetica Neue,

    Helvetica, sans-serif; } ! @font-face { font-family: "Bitstream Vera"; src:local(“Bitstream”), local(“Vera”), url(“https://mdn.mozillademos.org/files/2468/ VeraSeBd.ttf”) format('truetype'); }
  19. FONT FAMILIES .element { font-family: MyFontFamily, Arial, Helvetica Neue, Helvetica,

    sans-serif; } ! @font-face { font-family: MyFontFamily; src: url('myfont-webfont.eot?#iefix') format('embedded- opentype'), url('myfont-webfont.woff') format('woff'), url('myfont-webfont.ttf') format('truetype'), url('myfont-webfont.svg#svgFontName') format('svg'); }
  20. WHERE TO GET KILLER FONTS • Google Fonts - http://www.google.com/fonts

    • Font Squirrel - http://www.fontsquirrel.com/ • MyFonts - http://www.myfonts.com/ • TypeKit - http://typekit.com/ • Hoefler & Co. - http://www.typography.com/