Web Typography for Front End Developers

102
TYPE TODAY a primer on web typography in 2011 martha reig cykod.com @artimated for front-end developers

description

 

Transcript of Web Typography for Front End Developers

Page 1: Web Typography for Front End Developers

TYPE TODAYa primer on web typography in 2011

martha re!ig • cykod.com@artimated

for front-end developers

Page 2: Web Typography for Front End Developers

L!"#$r!!??

Page 3: Web Typography for Front End Developers

WHAT I'LL COVER๏ CSS3 & @font-face

๏ Where to find fonts

๏ How to choose

๏ Combining Fonts

๏ Why you should care about typography

๏ Pre!y Things

Page 4: Web Typography for Front End Developers

CSS3 & @FONT-FACE

Page 5: Web Typography for Front End Developers

PROS๏ We have more fonts to use!

(that means we aren’t limited to the verdana, arial, georgia basics)

๏ Dynamic, selectable, printable, and easily edited text

๏ Easy to implement

๏ Smaller and faster loading pages than images

Page 6: Web Typography for Front End Developers

CONS๏ Easy to overuse. Lots of funs fonts don’t make good

designs, good designers make good designs

๏ Licensing - if it’s not open sourced and you don’t have a license - don’t use it

๏ FOUT (flash of unstyled text)

๏ Rendering differences (pixel perfection should be a thing of the past)

Page 7: Web Typography for Front End Developers

GETTING YOUR FONTS INTO YOUR SITE

Page 8: Web Typography for Front End Developers

Browser Support

IE4Firefox 3.5 Opera 10 Safari 3.1Chrome 4

Page 9: Web Typography for Front End Developers

@FONT-FACE๏ Adds “font-family” fonts you can use with CSS

๏ Currently you need to provide 4 different versions of the same font to cover all browsers

๏ Don’t worry about the specificsuse a generator like fontsquirrel.comor use a hosting service

Page 10: Web Typography for Front End Developers

DON’T WRITE THIS - CUT AND PASTE FROM YOUR GENERATOR

RAW CODE@font-face { font-family: "Your typeface"; src: url("type/filename.eot"); src: local("☺"), url("type/filename.woff") format("woff"), url("type/filename.otf") format("opentype"), url("type/filename.svg#filename") format("svg"); }@font-face { font-family: "Your italic typeface"; src: url("type/filename-ital.eot"); src: local("☺"), url("type/filename-ital.woff") format("woff"), url("type/filename-ital.otf") format("opentype"), url("type/filename-ital.svg#filename-ital") format("svg"); }

Page 11: Web Typography for Front End Developers

EXAMPLE FROM GOOGLE FONTS

LINK CODE

<link href='http://fonts.googleapis.com/css?family=FontName&v2' rel='stylesheet' type='text/css'>

Page 12: Web Typography for Front End Developers

STYLE AS USUAL

YOUR CSS

h2 { font-family: "Your typeface", Georgia, serif; }

Page 13: Web Typography for Front End Developers

WHERE TO FIND THESE COOL FONTS?

Page 14: Web Typography for Front End Developers

Hosted Platforms

Page 18: Web Typography for Front End Developers

Buying a License

Page 20: Web Typography for Front End Developers

kernest.com

Page 23: Web Typography for Front End Developers

Free Fonts

Page 25: Web Typography for Front End Developers

FontSquirrel.com

Page 27: Web Typography for Front End Developers

FREE PROBLEMS๏ Quality not guaranteed

๏ Unknown rendering (hinting)

๏ Poorly drawn

๏ Poorly kerned

Page 28: Web Typography for Front End Developers

Complete Sets

I’d Love to Go!

I’d Love to Go!

Reklame

Reklame DEMOFREE

Page 29: Web Typography for Front End Developers

font hinting

A font test with hinting (lower rows) and without hinting (upper rows) at 100% (above) and 400% (below). Note the increased edge contrast with the hinted text but more faithful character shape and more natural inter-character spacing in the unhinted text.

http://en.wikipedia.org/wiki/Font_hinting

Page 30: Web Typography for Front End Developers

Kerning

VARIATIONVARIATION

League Gothic

BEBAS

Spaces between ALL letters should be even

Page 31: Web Typography for Front End Developers

MY LAST 2 CENTS๏ Make sure you own the license

๏ Read the EULA

๏ Desktop licenses are not the same as web

๏ Avoid liability issues

Page 32: Web Typography for Front End Developers

HOW TO CHOOSE FONTS

Page 33: Web Typography for Front End Developers

Know your styles

Page 34: Web Typography for Front End Developers

Old Style Slanted serifs, a moderate transition between the thick and thin strokes of a le!erform, and a diagonal stress (the angle of a line drawn through the thinnest parts of curved le!ers).

Handgloves

HandglovesGoudy Old Style

Palatino

Page 35: Web Typography for Front End Developers

ModernThin, horizontal serifs, a radical difference between the thick and thin strokes of a le!erform, and a vertical stress.

Handgloves

Handgloves

Bodoni

Didot

Page 36: Web Typography for Front End Developers

Slab SerifThick, horizontal serifs, li!le to no difference between the thick and thin strokes, and a vertical stress.

Handgloves

Handgloves

Clarendon

Archer

Page 37: Web Typography for Front End Developers

San SerifNo serifs, and most o#en monoweight (the strokes are pre!y much one thickness)

HandglovesHandgloves

Helvetica

League Gothic

Page 38: Web Typography for Front End Developers

ScriptAnything with a flowing, handwri!en style.

Handgloves

HandglovesBello

Reklame

Page 39: Web Typography for Front End Developers

DecorativeWhimsical and fun. Grunge faces are a subcategory in that they are definitely decorative, but lawless and edgy, breaking the rules, trashy and trendy.

HandglovesHandgloves

HandCancelled

Stencil

Page 40: Web Typography for Front End Developers

Know your audience and platform

Page 41: Web Typography for Front End Developers

Large x-height & counters for body textthe larger the bowls on le!ers like “b” and “h” the easier your text will be to read on a screen, especially at small sizes.

Large x-height & countersGeorgia

Small x-height & countersCochin

hobo hobo

Page 42: Web Typography for Front End Developers

Check your 1, I, and lthe number one, capital “i”, and lowercase “L” should be distinct.

1 I lGill Sans

1 I lGeorgia

1 I lMuseo

Page 43: Web Typography for Front End Developers

ReadabilityAt small sizes fonts with larger variation in weights will be harder to read.

HandglovesHandgloves

Bodoni 80px

Bodoni 24px

HandglovesHandgloves

Verdana 80px

Verdana 24px

Page 44: Web Typography for Front End Developers

Headline Vs. Text

Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy! ", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz.

Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy! ", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz.

League Gothic as headlineDroid Serif as body

Droid Serif as headlineLeague Gothic as body

Page 45: Web Typography for Front End Developers

AppropriateAlways honor your content and audience first.Choose fonts that are relevant to your subject before choosing what’s new and trendy.

S!, N!.Y!% &'(’# %)$ L!"#$r $v$r*w+$r$.

Page 46: Web Typography for Front End Developers

replaced all headings in nytimes.com with lobster using fontfriend

Page 47: Web Typography for Front End Developers

COMBINING FONTS

Page 48: Web Typography for Front End Developers

COMBINING FONTS๏ KISS (Keep It Simple Stupid)

๏ Don't over complicate: limit yourself to 2 Styles

๏ San Serif + Serif always works

๏ avoid similar styles/classifications

Page 49: Web Typography for Front End Developers

Go for contrast

Page 50: Web Typography for Front End Developers

The Golden Ratio Heading to Body font sizeHeading font size ÷ Body copy font size = 1.96

What this really means is that if you double your body size you will almost always have enough contrast in weight from the heading.

Page 51: Web Typography for Front End Developers

Though the current trend is big headlines...

Page 52: Web Typography for Front End Developers

designingmonsters.com

Page 55: Web Typography for Front End Developers

underconsideration.com/brandnewconference

Page 56: Web Typography for Front End Developers

Limiting yourself to one font can work beautifully as well.

Page 61: Web Typography for Front End Developers

WHY YOU SHOULD CARE ABOUT TYPOGRAPHY

Page 62: Web Typography for Front End Developers

Good typography is the easiest way to quickly make your site look good.

But most importantly, it will make your site easier to read and navigate for users.

Page 63: Web Typography for Front End Developers

HIERARCHY๏ Decide what is most important

and NOT everything can be important.

๏ Make more important things are bigger.

๏ Make less important smaller.

๏ Add emphasis with color, weight and style.

Page 64: Web Typography for Front End Developers

You need to decide what’s important

Page 66: Web Typography for Front End Developers

creativemornings.com

Page 67: Web Typography for Front End Developers

big headline

med body

small detail

red box for emphasis

red type for emphasis

creativemornings.com

Page 68: Web Typography for Front End Developers

emphasisGiving emphasis to a word without interrupting the reader is important. Italic is widely considered to be the ideal form of emphasis. Some other common forms of emphasis are: bold, caps, small caps, type size, color, underline or a different typeface. No ma!er which you choose, try to limit yourself to using only one. Combinations such as caps-bold-italic are disruptive and look clumsy.

Page 69: Web Typography for Front End Developers

Good

The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack.

Bad

The quick, brown fox JUMPS OVER A LAZY DOG. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack.

Page 70: Web Typography for Front End Developers

SPACE๏ Keep line length readable, not too long or short.

๏ Adjust the line-height to give more

๏ White space

Page 71: Web Typography for Front End Developers

How Many Characters Per Line?According to Robert Bringhurst, who wrote my typography bible, 45 to 75.

Recent web studies show that 66 might be the “web ideal”

Page 72: Web Typography for Front End Developers

Line HeightThe quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack.

The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk

MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for

quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox.

Bright vixens jump; dozy fowl quack.

The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk

MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for

quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox.

Bright vixens jump; dozy fowl quack.

NO

YES

NO

Page 73: Web Typography for Front End Developers

Letter SpacingCozy sphinx waves quart jug of bad milk.

Cozy sphinx waves quart jug of bad milk.

C o z y s p h i n x w a v e s q u a r t j u g o f b a d m i l k .

C O Z Y S P H I N X W A V E S

NO

YES

NO

OK

Page 74: Web Typography for Front End Developers

embrace white spaceNot every pixel needs to be covered in text or graphics.

White space doesn’t have to be white, it can be red, green, black, or pa!erned. It’s simply space that is le# vacant.

The vacant space makes it easier for the reader to navigate through the content of your site.

Page 75: Web Typography for Front End Developers

be a type rockstar

Page 76: Web Typography for Front End Developers

Read

Stop Stealing Sheep & find out how type works

by Erik Spiekermann & E.M. Ginge

The Elements of Typographic Style

by Robert Bringhurst

Page 77: Web Typography for Front End Developers

- hyphenused to separate the words in a compound adjective, verb, or adverb.

The friendly-looking man in the front is waiting for a much-needed break.

Page 78: Web Typography for Front End Developers

– The en dash (&#8211;) used to express a range of values or a distance

The Red Sox beat the Yankees 4–0.

Page 79: Web Typography for Front End Developers

— The em dash (&#8212;) used to indicate a break in thought

The pizza—with warm cheese and spicy pepperoni—was delicious.

Page 80: Web Typography for Front End Developers

Be Smart not Dumb

#8216; = opening single quote

&#8217 = closing single quote

&#8220 = opening double quote

&#8221 = closing double quote

‶dumb double quotes‶“smart double quotes”

‵dumb single quotes‵“smart single quotes”

Page 81: Web Typography for Front End Developers

Two spaces between sentences.Repent of this sin by using only one space.

Dumb quotes instead of smart quotes.Evil: "Thou shalt not misuse type" Good: “Thou shalt not misuse type”

Dumb apostrophe instead of a smart apostrophe.Profane: Don't use prime marks Sacred: Don’t use prime marksBy the way, apostrophes always face this way: Pot o’ gold.They never face this way: Pot ‘o gold.

Failing to tuck periods/commas inside quotes marks.Immoral: “I love type so much”, she confessed.Chaste: “I love type so much,” she testi!ed.

Failing to kern display type.Unseemly gaps can impede readability and be distracting to the reader. Adjusting the spacing between letters will assuage your guilt.

Using a hyphen instead of an en dash.Use an en dash to indicate a duration of time instead of the word “to”: the 8–10 commandments, not 8-10 commandments.

Using two hyphens instead of an em dash. An em dash signi!es a change in thought—or a parenthetical phrase—within a sentence.

Too many consecutive hyphens.It is sinful to have more than two hyphens on consecutive lines of type, and even that should be avoided.

Large amounts of bodytext in uppercase letters.IT BECOMES REALLY DIFFICULT TO READ.

Large amounts of reversed type ARE HARDER TO READ. Type on a busy background is also unreadable.

Using process colors for body text.It is harder to read, but more importantly, it is hell to register on press.

Underlining titles instead of italicizing them.Thou Shalt Not: The Holy Bible Thou Shalt: The Korán

Failing to eliminate widows.A widow is a word that sits on a line by itself at the end of a paragraph. Avoid this or risk being cast into a lake of !re and brimstone.

Failing to eliminate orphans.An orphan is the last line of a paragraph that sits alone at the top of a column or page. Type does not like to be alone.

Rivers in justified text.Unsightly large spaces between words occur if the line length is too short or the point size of the text too large.

Inconsistent leading.Paragraphs should have the same leading for each line.

Indenting the first paragraph.The !rst paragraph is never indented, subsequent paragraphs are.

Indenting a paragraph too far.The standard indent for a paragraph is 1 em, not " inch. Most software has default tabs set for " inch, so adjust the tabs.

Failing to hang punctuation into the margin.Punctuation has less visual weight than letters or numbers. Compensate for this in display text by hanging the punctuation into the margin.

Failing to use or create fractions.Wicked: 1/2 Righteous: "

Incorrectly abbreviating AM and PM.Unclean: am, AM, A.M. Relatively Clean: a.m. Clean: a.m. or AM

Failing to provide margins for type in a box.

Faux italic/oblique, bold and small cap type.Impure: Italic Pure: ItalicSinful: Bold Virtuous: BoldUnkosher: SMALLCAPS Kosher: Smallcaps

Strokes that encroach upon letterforms.Hellacious Heavenly

Horizontally scaled type.Unrepentant: Scaled Penitent: A condensed typeface

Vertically scaled type.Purgatory: Scaled Heaven: An extended typeface

Negative letterspacing.Not very readable.

Bad line breaks in headlines and body text. If you don’t break lines for sense, they can be harder to read.

Stacking lowercase letters.Vertical baselines are celestial.

Failing to indent bulleted lists.• Bulleted lists look better when the second line aligns #ush

with the !rst letter of the line above it, instead of with the bullet.

Failing to use accent marks.Sinner: No esta aqui Saint: No está aquí.

Failing to align baselines of type in adjacent columns of body text.Baselines of all columns of text on a page should align. This creates a pleasing margin of pure white space.

Failing to correct bad rags.For centered or non-justi!ed text, avoid obvious shapes (like pyramids, steps, wedges, angles and overly short or long lines).

Failing to use ligatures.unholy: holy:

thirty-four

sublim

e

eyesore

© 2008 Jim Godfrey, with Patrick Wilkey as a key contributor.

h!p:

//w

ww

.jim

godf

reyd

esig

n.co

m/t

ypeS

ins.

pdf

Thiry-Four Typographic Sins by Jim Godfrey

Page 82: Web Typography for Front End Developers

TIPS & TRICKS

Page 83: Web Typography for Front End Developers

letteringjs.com

Page 84: Web Typography for Front End Developers

lostworldsfairs.com/moon

Page 85: Web Typography for Front End Developers

preparetoactivate.com

Page 86: Web Typography for Front End Developers

useful tools

Page 87: Web Typography for Front End Developers

somadesign.ca/projects/fontfriend/

Page 88: Web Typography for Front End Developers

chengyinliu.com/whatfont.html

Page 89: Web Typography for Front End Developers

Trends

Page 90: Web Typography for Front End Developers

webvisionaryawards.com

Page 91: Web Typography for Front End Developers

snowdenindustries.com

Page 93: Web Typography for Front End Developers

nicewebtype.com/fonts

Page 94: Web Typography for Front End Developers

beercamp.com/2010

Page 95: Web Typography for Front End Developers

freestyle-night.ch

Page 96: Web Typography for Front End Developers

philipmeissnerdesign.com

Page 97: Web Typography for Front End Developers

collaborativefund.com

Page 98: Web Typography for Front End Developers

golivebutton.com

Page 99: Web Typography for Front End Developers

I was going to put together some demos on how to create these effects....

Page 100: Web Typography for Front End Developers

http://line25.com/articles/using-css-text-shadow-to-create-cool-text-effects

but Chris Spooner of Line25 already has some great ones.

Page 101: Web Typography for Front End Developers

RESOURCES๏ typedia.com

๏ typophile.com

๏ ilovetype.com

๏ alistapart.com

๏ le!ering.js

๏ ffffallback.com

๏ ifontyou.com

Page 102: Web Typography for Front End Developers

THANKS!

martha re!ig • cykod.com@artimated