the changing face of web typography

38
web typography THE CHANGING FACE OF #webqtype

Upload: drywallbmb

Post on 28-Jan-2015

104 views

Category:

Technology


0 download

DESCRIPTION

Type on the web has evolved significantly over time as designers and developers have fought to overcome limitations on web fonts. This presentation provides a brief history of different techniques that have been used over the years to get around these obstacles, including image replacement and sIFR, before getting in-depth with @font-face.Presented to Webuquerque on May 4, 2011.

TRANSCRIPT

Page 1: The Changing Face of Web Typography

web typographyTHE CHANGING FACE OF

#webqtype

Page 2: The Changing Face of Web Typography

JANUARY 2010

“Type in HTML is limited to what the user has installed on his/her computer”

“You don’t have a lot of fonts to choose from”

Page 3: The Changing Face of Web Typography

I WAS WRONG

Page 4: The Changing Face of Web Typography

I WAS WRONGa lot has changed since then

Page 5: The Changing Face of Web Typography

IN THE BEGINNING(or very near it)

Page 6: The Changing Face of Web Typography

EARLY HTML TYPE CONTROLS

<h1> – <h6>

<b> <i>

<strong> <em>

<pre> <code> <cite>

Page 7: The Changing Face of Web Typography

THE <font> TAG

• introduced in HTML 3.2 (January 1997)• deprecated in HTML 4.0 (December 1997)

Yes, this has been deprecated for over 13 years.

stop using it.

Page 8: The Changing Face of Web Typography

ENTER CSS

• font-family stack• font-style/weight• font-size• letter-spacing• text-transform• text-indent

Page 9: The Changing Face of Web Typography

THE PROBLEM

Page 10: The Changing Face of Web Typography

THE PROBLEM

ArialComic SansCourierGeorgiaImpact

Lucida Sans

PalatinoTahomaTimes New RomanTrebuchet MSVerdana

Page 11: The Changing Face of Web Typography

THE WORKAROUNDS

Page 12: The Changing Face of Web Typography

IMAGE REPLACEMENT

Page 13: The Changing Face of Web Typography

IMAGE REPLACEMENT

BAD <img> element with no alt attribute

BETTER <img> element within <h1> (or similar)

BEST CSS background-image replacement

Page 14: The Changing Face of Web Typography

IN YOUR HTML: <h1 id=“title”>This is the headline</h1>

IN YOUR CSS: h1#title { height: 40px; width: 350px; overflow: hidden; text-indent: -9999px; background-image:url(headline.png); }

IMAGE REPLACEMENT

Page 15: The Changing Face of Web Typography

IMAGE REPLACEMENT

PROS• design flexibility• simple• “it just works”

CONS• filesize issues• easy to do badly• maintenance

Page 16: The Changing Face of Web Typography

sIFRScalable Inman Flash Replacement

Page 17: The Changing Face of Web Typography

HOW sIFR WORKS

Your Generic Headline

Page 18: The Changing Face of Web Typography

HOW sIFR WORKS

Page 19: The Changing Face of Web Typography

HOW sIFR WORKS

Your Generic Headline

Page 20: The Changing Face of Web Typography

sIFR

PROS• independent of content

CONS• requires JS and Flash• “FOUT”• hard to get perfect

Page 21: The Changing Face of Web Typography

CUFÓNno, not the Computer UFO Network

Page 22: The Changing Face of Web Typography

CUFÓN

PROS• faster than sIFR• easier than sIFR

CONS• requires JS• no text selectability• pronunciation

Page 23: The Changing Face of Web Typography

ENTER @font-faceOur long-awaited savior (sort of)

Page 24: The Changing Face of Web Typography

@font-face HISTORY

• First introduced in css2 in 1998• Removed in css2.1 in 2002• Re-introduced in css3

Page 25: The Changing Face of Web Typography

@font-face SUPPORT

IE 41997

Firefox 3.52009

Opera 102009

Safari 3.12008

Chrome 4Jan 2010

Page 26: The Changing Face of Web Typography

HOW @font-face WORKS@font-face { font-family: ‘Yourfont’; src: url(‘fontfile.ttf’) format(‘truetype’);}

@font-face { font-family: ‘Yourfont’; font-weight: bold; src: url(‘fontfile-bold.ttf’) format(‘truetype’);}

body { font-family: Yourfont, Arial, sans-serif;}

Page 27: The Changing Face of Web Typography

BUT WAIT!

Page 28: The Changing Face of Web Typography

FONT FORMATSDifferent browsers support different font file types:

and of course you want to avoid local fonts...

TrueType(mobile)Safari

OperaFirefox

OpenType SafariOperaFirefox

WOFFIE9

Firefox 3.6Chrome 6

EOTIE

SVGiOS<4.2

Page 29: The Changing Face of Web Typography

@font-face REVISITED

@font-face { font-family: 'MyWebFont'; src: url('webfont.eot'); src: url('webfont.eot?#iefix') format('embedded-opentype'), url('webfont.woff') format('woff'), url('webfont.ttf') format('truetype'), url('webfont.svg#svgFontName') format('svg'); }

...or something like that anyway...

Page 30: The Changing Face of Web Typography

LEVERAGING @font-facethird-party hosted vs self-serve

Page 31: The Changing Face of Web Typography

THIRD-PARTY TOOLS

• take the complexities out• often cost money• providers:

Typekit.com Fonts.com Google.com/webfonts Fontdeck.com

Page 32: The Changing Face of Web Typography

SELF-HOSTING

• no ongoing costs• no CDN (for better or worse)• require you to provide fonts in correct formats • need to worry about licensing

This is fontsquirrel.fontsquirrel is your friend!

Page 33: The Changing Face of Web Typography

DON’T STEAL FONTS

Page 34: The Changing Face of Web Typography

PLACES FOR LEGIT FONTS

Kernest.comGoogle.com/webfonts

Fontsquirrel.comLeague of Moveable Type

FontSpring.comOthers....

Page 35: The Changing Face of Web Typography

DON’T STEAL FONTSor else kittens will die

Page 36: The Changing Face of Web Typography

TECHNICAL CONCERNS

http://bit.ly/cfowt

FOUT*Resource downloads

OutagesCompressionLazy Loading

Page 37: The Changing Face of Web Typography

ON THE HORIZON...

font-kerningfont-variant-ligatures

font-variant-capsfont-variant-numeric

font-variant-alternatesand more!

but still nothing for cross-platform rendering!

Page 38: The Changing Face of Web Typography

CONNECT

Ben Byrne

[email protected]/drywall

AIM: drywallbmbTwitter: @drywall

http://spkr8.com/t/7394