Typography for the Web

55
Typography for the Web Josh Nichols @mrblank

description

 

Transcript of Typography for the Web

Page 1: Typography for the Web

Typography for the Web

Josh Nichols @mrblank

Page 2: Typography for the Web

95%Web design is

http://informationarchitects.net/blog/the-web-is-all-about-typography-period/

typography

Page 3: Typography for the Web

Rules

Page 4: Typography for the Web

Thou shalt• Always use sans-serif text for body copy

• Always use ems for sizing type

• Always use black text on a white background

• Always use web-safe colors

• Always use web-safe fonts

• Always make links blue and underlined

• Never use italics

Page 5: Typography for the Web
Page 6: Typography for the Web

Nonsense

Page 7: Typography for the Web

http://lostworldsfairs.com/eldorado/

Page 8: Typography for the Web

http://jasonsantamaria.com/articles/chunky-in-fury

Page 9: Typography for the Web

http://holidays.virb.com/

Page 10: Typography for the Web

Beautiful type

Page 11: Typography for the Web

http://trentwalton.com/2011/05/10/fit-to-scale/

Page 12: Typography for the Web

http://trentwalton.com/examples/cowpoke/

Page 13: Typography for the Web

http://lostworldsfairs.com/atlantis/

Page 14: Typography for the Web

is possible

Page 15: Typography for the Web

http://mattt.me/

Page 16: Typography for the Web

http://lostworldsfairs.com/moon/

Page 17: Typography for the Web

http://www.strangenative.com/foldup/

Page 18: Typography for the Web

on the Web

Page 19: Typography for the Web

http://www.castirondesign.com/

Page 20: Typography for the Web

http://lefft.com/

Page 21: Typography for the Web

http://stationstreetpgh.com/

Page 22: Typography for the Web

Learn

Page 23: Typography for the Web

http://psd.tutsplus.com/articles/techniques/a-20-minute-intro-to-typography-basics/

Page 24: Typography for the Web

http://www.peachpit.com/store/product.aspx?isbn=0201782634

Page 25: Typography for the Web

http://webtypography.net/

Page 26: Typography for the Web

Markup

Page 27: Typography for the Web

" ≠ “

Page 28: Typography for the Web

-- ≠ –

Page 29: Typography for the Web

http://www.tinymce.com/

TinyMCE

Page 30: Typography for the Web

http://daringfireball.net/projects/smartypants/

SmartyPants

" » “-- » –

Page 31: Typography for the Web

http://www.shauninman.com/archive/2006/08/22/widont_wordpress_plugin

Widon’twidow

The lonely life of an unlucky widow widon’t

The lonely life of an unlucky widow

Page 32: Typography for the Web

http://code.google.com/p/typogrify/

Typogrify

Page 33: Typography for the Web

http://kingdesk.com/projects/wp-typography/

WP Typography

Page 34: Typography for the Web

Style

Page 35: Typography for the Web

The old way

Page 36: Typography for the Web

http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html

Default system fonts

Page 37: Typography for the Web

http://cssfontstack.com/

Font Stack

body { font-family: Georgia, Times, "Times New Roman", serif; font-weight: normal; font-style: normal;}

Page 38: Typography for the Web

The new way

Page 39: Typography for the Web

https://typekit.com/

Page 40: Typography for the Web

http://www.webink.com/

Page 41: Typography for the Web

http://www.fontsquirrel.com/

Page 42: Typography for the Web

http://www.google.com/webfonts/

Page 43: Typography for the Web

Hosted<script type="text/javascript" src="http://use.typekit.com/lbp4ytj.js"> </script><script type="text/javascript"> try{Typekit.load();}catch(e){} </script>

body { font-family: "proxima-nova", Arial, sans-serif; font-weight: 400; font-style: normal;}

Page 44: Typography for the Web
Page 45: Typography for the Web

Self-hostedLink to all the various font formats.@font-face { font-family: 'DejaVuSans'; src: url('fonts/DejaVuSans-webfont.eot'); src: url('fonts/DejaVuSans-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/DejaVuSans-webfont.woff') format('woff'), url('fonts/DejaVuSans-webfont.ttf') format('truetype'), url('fonts/DejaVuSans-webfont.svg#DejaVuSansBook') format('svg'); font-weight: normal; font-style: normal;}

Page 46: Typography for the Web

For weight & styles, FontSquirrel gets it wrong.

Keep the font-family name the same and change the src, font-weight and font-style.

@font-face { font-family: 'DejaVuSans'; src: url('fonts/DejaVuSans-Bold-webfont.eot'); src: url('fonts/DejaVuSans-Bold-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/DejaVuSans-Bold-webfont.woff') format('woff'), url('fonts/DejaVuSans-Bold-webfont.ttf') format('truetype'), url('fonts/DejaVuSans-Bold-webfont. svg#DejaVuSansBookBold') format('svg'); font-weight: bold; font-style: normal;}

Page 47: Typography for the Web

Build your stack.

body { font-family: "DejaVuSans", Arial, sans-serif; font-weight: normal; font-style: normal;}

Page 48: Typography for the Web

Scripts

Page 49: Typography for the Web

http://812studio.com/initial-letter-a-jquery-plugin-for-making-drop-caps-and-more/

Page 50: Typography for the Web

http://letteringjs.com/

Page 51: Typography for the Web

http://fittextjs.com/

Page 52: Typography for the Web

Tips

Page 53: Typography for the Web

Choose wisely• Only embed the fonts you need.

• Watch for weight & style versions. Browsers will fake them poorly if missing.

• Some fonts don’t have all glyphs needed.

• Check font rendering on both Windows and Mac before designing. Not all look the same cross platform.

• If using a wide or condensed font, make sure your fallback in the stack won’t break your layout. http://modernizr.com/ can help fix that.

Page 54: Typography for the Web

CSS• You can use measurements in px again!

• Tell browsers to use kerning and ligatures:

.foo { text-rendering: optimizelegibility; }

• Font smoothing for reversed text in Webkit on the Mac:

.foo { -webkit-font-smoothing: antialiased; font-smoothing: antialiased;

}

Page 55: Typography for the Web

Thanks!

Josh Nichols @mrblank