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

Typesetting the Web

Kyle Fox
November 16, 2012

Typesetting the Web

This is a talk I gave at WordCamp Edmonton in November 2012. For other type, design & web nerdery, follow me on Twitter: http://twitter.com/kylefox

"Typography is the vessel that carries an ideas to your audience. In addition to being beautiful, proper typography affords your message credibility, clarity, and emotional resonance. This talk explains why typography is crucial to the success of a website and demonstrates best practices for styling text on the web. You’ll learn basic typeface anatomy & terminology, typesetting techniques (such as font sizing, line length & line height), and how to choose appropriate fonts for the web."

Primary typefaces in the slides are:

* Alegreya (http://www.google.com/webfonts/specimen/Alegreya)
* Pluto Sans (http://www.myfonts.com/fonts/hvdfonts/pluto-sans/).

Also making appearances are Chaparral Pro, Changa One, Klavika Condensed, Exo, Omnes, and Skolar. I know, I violated some of my own guidelines by used a big range of faces but OH WELL.

Kyle Fox

November 16, 2012
Tweet

More Decks by Kyle Fox

Other Decks in Design

Transcript

  1. What this talk is about ‣ Why care about type?

    ‣ Choosing typefaces ‣ Setting text to look snazzy
  2. What this talk is not about ‣ Jessica Hische and/or

    lettering ‣ Typeface classification ‣ Webfonts or @font-face
  3. “the differences between good and poor typography appear to have

    little effect on common performance measures such as reading speed and comprehension.”
  4. “the differences between good and poor typography appear to have

    little effect on common performance measures such as reading speed and comprehension.” Source: The Aesthetics of Reading Dr. Kevin Larson & Dr. Rosalind W. Picard
  5. “high quality typography appears to induce a positive mood.” “Creative

    cognitive tasks have shown performance improvements when participants were induced into a positive mood.”
  6. serif vs. sans-serif has resulted in a body of research

    consisting of weak claims and counter-claims, and study after study with ndings of no difference. “
  7. Proper Tracking? Bright vixens jump dozy fowl quack. Bright vixens

    jump dozy fowl quack. Bright vixens jump dozy fowl quack.
  8. Does it have: ‣ Condensed + WIDE ‣ Numerous different

    weights? ‣ True italics? ‣ pen yp feature
  9. Final words about choosing fonts: ‣ Test your fonts all

    over. Mobile, retina, etc. ‣ Pay for (don’t pirate) good fonts. ‣ Don’t use display (decorative) fonts for text. ‣ Don’t reuse your logo’s typeface. ‣ Experiment with pairing fonts. Sticking to one serif and one sans-serif usually yields good results.
  10. Typesetting* refers to how pieces of text are styled &

    arranged to work together in a composition. * typesetting & typography are roughly equivalent
  11. A quick discussion about CSS units ‣ Don’t use absolute

    physical units (pt, in, cm, etc.) ‣ Pixels (px) are ... okay. Pixels make it difficult to define proportional relationships. ‣ Prefers %, em, rem
  12. Make the typeface big. Then make the typeface bigger. ‣

    16px should be the standard for long text. ‣ Consider making it even bigger. ‣ Mobile can be smaller (~12px) as it’s held closer to the eye. ‣ Use a typographic scale to inform your font size choices.
  13. For too long typographic style and its accompanying attention to

    detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. line-height: 1; too tight For too long typographic style and its accompanying attention to detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. line-height: 1.5; just right For too long typographic style and its accompanying attention to detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. line-height: 2; too much
  14. For too long typographic style and its accompanying attention to

    detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. Robert Bringhurst’s book The Elements of Typographic Style is on many a designer’s bookshelf and is considered to be a classic in the field. Indeed the renowned typographer Hermann Zapf proclaims the book to be “a must for everybody in the graphic arts, and especially for our new friends entering the field.” In order to allay some of the myths surrounding typography on the web, I have structured this website to step through Bringhurst’s working principles, explaining how to accomplish each using techniques available in html and css. The future is considered with coverage of css3, and practicality is ever present with workarounds, alternatives and compromises for less able browsers. Pro tip: use same proportion for bottom margin
  15. Add and delete vertical space in measured intervals line-height: 1.5;

    too loose Headings: keep them tighter Add and delete vertical space in measured intervals line-height: 1.1; much better
  16. For too long typographic style and its accompanying attention to

    detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. ~130 characters way too wide For too long typographic style and its accompanying attention to detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. ~40 characters too narrow For too long typographic style and its accompanying attention to detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. ~75 characters looks good!
  17. Sadly, can’t just set max-width:75em; ems in CSS don’t have

    anything to do with the font’s character width. Instead, ems refer to the current font size (height). We’ve been lied to. Solution: you’ll need to eyeball it
  18. For too long typographic style and its accompanying attention to

    detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. For too long typographic style and its accompanying attention to detail have been overlooked by website designers, particularly in body copy. In years gone by this could have been put down to the technology, but now the web has caught up. The advent of much improved browsers, text rendering and high resolution screens, combine to negate technology as an excuse. Relationship between line height & length Line height increases proportionally to line length. Narrow line, less line height. Wider line, more line height.
  19. Use the trusty CRAP approach to create hierarchy. ‣ Contrast

    ‣ Repetition ‣ Alignment ‣ Proximity
  20. Use the trusty CRAP approach to create hierarchy. ‣ Contrast

    (size, weight, italic, condensed/wide, small-caps, tone) ‣ Repetition ‣ Alignment ‣ Proximity
  21. Use the trusty CRAP approach to create hierarchy. ‣ Contrast

    (size, weight, italic, condensed/wide, small-caps, tone) ‣ Repetition (stick to a handful of typographic arrangements, use in same contexts) ‣ Alignment ‣ Proximity
  22. Use the trusty CRAP approach to create hierarchy. ‣ Contrast

    (size, weight, italic, condensed/wide, small-caps, tone) ‣ Repetition (stick to a handful of typographic arrangements, use in same contexts) ‣ Alignment (blocks of text should align. more of a layout thing) ‣ Proximity (use vertical margins to group related content and space dissimilar content)
  23. Lecture title now appears in bold. (contrast) Note that this

    change was drastic enough that the order of the text can be changed without sacrificing clarity.
  24. A larger font size it used to add even more

    contrast to the lecture title. More vertical space further emphasizes grouped content.
  25. Drastic weights & sizes changes (along with a break in

    alignment) reinforce the talk title as the first piece of content a reader should be drawn to.
  26. Once basic legibility & readability are achieved, the real power

    of typography is to evoke an emotional response.
  27. Choose the best fonts that have an appropriate voice, ensure

    legibility & are of high technical quality.