Progressive Enhancement & Intentional Degradation 2

127
Progressive Enhancement & Intentional Degradation 2 Font Embedding & New Design Possibilities by Elliot Jay Stocks elliotjaystocks.com | twitter.com/elliotjaystocks

description

 

Transcript of Progressive Enhancement & Intentional Degradation 2

Page 1: Progressive Enhancement & Intentional Degradation 2

Progressive Enhancement & Intentional Degradation 2Font Embedding & New Design Possibilities

by Elliot Jay Stockselliotjaystocks.com | twitter.com/elliotjaystocks

Page 2: Progressive Enhancement & Intentional Degradation 2

1

2

3

4

5

6

7

Enhancement & degradation

A personal typographic journey

Enhancing web typography

We have issues

New possibilities with CSS3

Start using it NOW

Controversial parting thought

Page 3: Progressive Enhancement & Intentional Degradation 2

1Enhancement & Degradation

Page 4: Progressive Enhancement & Intentional Degradation 2

Enhancement: reward

Page 5: Progressive Enhancement & Intentional Degradation 2

Enhancement: reward

Visual treats for the more capable browser

Page 6: Progressive Enhancement & Intentional Degradation 2

Degradation: punishment

Page 7: Progressive Enhancement & Intentional Degradation 2

Degradation: punishment

The removal of a treat

Page 8: Progressive Enhancement & Intentional Degradation 2

Degradation: punishment

The removal of a treat

The designer giveth and the designer taketh away!

Page 9: Progressive Enhancement & Intentional Degradation 2

Intention

Page 10: Progressive Enhancement & Intentional Degradation 2

Intention

An awareness of browser capabilities and the appreciation that sites don’t need to look in the same in each one.

Page 11: Progressive Enhancement & Intentional Degradation 2

Intention

An awareness of browser capabilities and the appreciation that sites don’t need to look in the same in each one.

Safari IE6

Stuff and Nonsense stuffandnonsense.co.uk

Page 12: Progressive Enhancement & Intentional Degradation 2

Shouldwebsites lookthe same in

all browsers?

Page 13: Progressive Enhancement & Intentional Degradation 2

shouldwebsiteslookthesameinallbrowsers.com

Page 14: Progressive Enhancement & Intentional Degradation 2

2A personal typographic journey

Page 15: Progressive Enhancement & Intentional Degradation 2

The early days...... Dreamweaver...... confusion!

Page 16: Progressive Enhancement & Intentional Degradation 2

The early days...... Dreamweaver...... confusion!

The choice of fonts appeared to be system-wide

Page 17: Progressive Enhancement & Intentional Degradation 2

Note: CS3 panel shown

Dreamweaver adobe.com/products/dreamweaver

Page 18: Progressive Enhancement & Intentional Degradation 2

The early days...... Dreamweaver...... confusion!

The choice of fonts appeared to be system-wide

It wasn’t clear about web-safe fonts

Page 19: Progressive Enhancement & Intentional Degradation 2

The early days...... Dreamweaver...... confusion!

The choice of fonts appeared to be system-wide

It wasn’t clear about web-safe fonts

To an extent, Dreamweaver is still guilty

Page 20: Progressive Enhancement & Intentional Degradation 2

The allure of Flash

Page 21: Progressive Enhancement & Intentional Degradation 2

The allure of Flash

You can use any font you liked

Page 22: Progressive Enhancement & Intentional Degradation 2

The allure of Flash

You can use any font you like

Layout freedom, a la print design (vs. HTML inconsistency)

Page 23: Progressive Enhancement & Intentional Degradation 2

The allure of Flash

You can use any font you like

Layout freedom, a la print design (vs. HTML inconsistency)

Hence type can be presented as intended

Page 24: Progressive Enhancement & Intentional Degradation 2

Back to basics: HTML

Page 25: Progressive Enhancement & Intentional Degradation 2

Back to basics: HTML

Accessible: screenreader-friendly and allows for resizing

Page 26: Progressive Enhancement & Intentional Degradation 2

Back to basics: HTML

Accessible: screenreader-friendly and allows for resizing

Updatable: the source text dictates the final render

Page 27: Progressive Enhancement & Intentional Degradation 2

Back to basics: HTML

Accessible: screenreader-friendly and allows for resizing

Updatable: the source text dictates the final render

Simple: HTML and CSS — that’s it!

Page 28: Progressive Enhancement & Intentional Degradation 2

Image replacement

Page 29: Progressive Enhancement & Intentional Degradation 2

Image replacementPROS

It looks goodIt gives control over other elements besides type

Page 30: Progressive Enhancement & Intentional Degradation 2

Image replacementPROS

It looks goodIt gives control over other elements besides type

CONS

Difficult to updateInaccessible in some situationsPotentially it differs from the source code

Page 31: Progressive Enhancement & Intentional Degradation 2

sIFR

Page 32: Progressive Enhancement & Intentional Degradation 2

sIFR at work on Jason Santa Maria’s site jasonsantamaria.com

Page 33: Progressive Enhancement & Intentional Degradation 2

sIFR

The best of both worlds: the accessibility and ‘selectability’ of HTML but with (some of)* the benefits of Flash-based rendering.

* = Layout is still determined by HTML

Page 34: Progressive Enhancement & Intentional Degradation 2

sIFR

The best of both worlds: the accessibility and ‘selectability’ of HTML but with (some of)* the benefits of Flash-based rendering.

Gracefully degrades for users without Flash / JS.

* = Layout is still determined by HTML

Page 35: Progressive Enhancement & Intentional Degradation 2

sIFR

The best of both worlds: the accessibility and ‘selectability’ of HTML but with (some of)* the benefits of Flash-based rendering.

Gracefully degrades for users without Flash / JS.

It’s brilliant, but essentially it’s a hack; not a solution.

* = Layout is still determined by HTML

Page 36: Progressive Enhancement & Intentional Degradation 2

Mike Davidson, mikeindustries.com/blog/sifr

While sIFR gives us better typography today, it is clearly not the solution for the next 20 years.

It is but a nice stopgap for people who value the importance of typography and don’t want to wait 1, 5, or 10 years for browser makers, OS vendors, and type foundries to figure out a better solution.

The moment that happens however, sIFR will lift right out and give way to whatever other method is available.

~ Mike Davidson

Page 37: Progressive Enhancement & Intentional Degradation 2

Mike Davidson, mikeindustries.com/blog/sifr

While sIFR gives us better typography today, it is clearly not the solution for the next 20 years.

It is but a nice stopgap for people who value the importance of typography and don’t want to wait 1, 5, or 10 years for browser makers, OS vendors, and type foundries to figure out a better solution.

The moment that happens however, sIFR will lift right out and give way to whatever other method is available.

~ Mike Davidson

Page 38: Progressive Enhancement & Intentional Degradation 2

Mike Davidson, mikeindustries.com/blog/sifr

While sIFR gives us better typography today, it is clearly not the solution for the next 20 years.

It is but a nice stopgap for people who value the importance of typography and don’t want to wait 1, 5, or 10 years for browser makers, OS vendors, and type foundries to figure out a better solution.

The moment that happens however, sIFR will lift right out and give way to whatever other method is available.

~ Mike Davidson

Page 39: Progressive Enhancement & Intentional Degradation 2

Font embedding

Page 40: Progressive Enhancement & Intentional Degradation 2

Font embedding

Browser-supported font embedding is, I believe, the future of web typography.

Page 41: Progressive Enhancement & Intentional Degradation 2

The future of web typography3

Page 42: Progressive Enhancement & Intentional Degradation 2

@font-face

Page 43: Progressive Enhancement & Intentional Degradation 2

@font-face

Originated in the CSS2 spec, despite its general association with CSS3.

Page 44: Progressive Enhancement & Intentional Degradation 2

@font-face

Originated in the CSS2 spec, despite its general association with CSS3.

Extremely simple to implement.

Page 45: Progressive Enhancement & Intentional Degradation 2

@font-face

Originated in the CSS2 spec, despite its general association with CSS3.

Extremely simple to implement.

Current support:Safari 3.1Firefox 3.1Opera 10

Page 46: Progressive Enhancement & Intentional Degradation 2

@font-face

Originated in the CSS2 spec, despite its general association with CSS3.

Extremely simple to implement.

Current support:Safari 3.1Firefox 3.1Opera 10

Has some piracy issues. (More on that in a sec!)

Page 47: Progressive Enhancement & Intentional Degradation 2

Jos Buivenga’s fonts josbuivenga.demon.nl

Page 48: Progressive Enhancement & Intentional Degradation 2

Microsoft’s EOT(Embedded Open Type)

Page 49: Progressive Enhancement & Intentional Degradation 2

Microsoft’s EOT(Embedded Open Type)

Supported since IE4

Page 50: Progressive Enhancement & Intentional Degradation 2

IE4!!!

Page 51: Progressive Enhancement & Intentional Degradation 2

Microsoft’s EOT(Embedded Open Type)

Supported since IE4 (but not in IE8 yet).

Font encoding protects against piracy.

Page 52: Progressive Enhancement & Intentional Degradation 2

Microsoft’s EOT(Embedded Open Type)

Supported since IE4 (but not in IE8 yet).

Font encoding protects against piracy.

EOT has been submitted to the W3C for approval as a new standard. Discussions are still underway.

Page 53: Progressive Enhancement & Intentional Degradation 2

Microsoft’s EOT(Embedded Open Type)

Supported since IE4 (but not in IE8 yet).

Font encoding protects against piracy.

EOT has been submitted to the W3C for approval as a new standard. Discussions are still underway.

WEFT: Web Embedding Fonts Tool for making .eot files.

Page 54: Progressive Enhancement & Intentional Degradation 2

<style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.otf') format('opentype'); }

</style>

<!--[if IE]><style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.eot'); }

</style><![endif]-->

jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work

Page 55: Progressive Enhancement & Intentional Degradation 2

<style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.otf') format('opentype'); }

</style>

<!--[if IE]><style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.eot'); }

</style><![endif]-->

jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work

Page 56: Progressive Enhancement & Intentional Degradation 2

<style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.otf') format('opentype'); }

</style>

<!--[if IE]><style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.eot'); }

</style><![endif]-->

jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work

Page 57: Progressive Enhancement & Intentional Degradation 2

<style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.eot'); src: url('Fontin-Regular.otf') format('opentype'); }

</style>

Comment from ‘Nicholas’, webdirections.org/blog/the-return-of-font-embedding-to-the-web

Page 58: Progressive Enhancement & Intentional Degradation 2

<style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.eot'); src: url('Fontin-Regular.otf') format('opentype'); }

</style>

Comment from ‘Nicholas’, webdirections.org/blog/the-return-of-font-embedding-to-the-web

Page 59: Progressive Enhancement & Intentional Degradation 2

<style type="text/css" media="screen">

@font-face{ font-family:'Fontin-Regular'; src: url('Fontin-Regular.eot'); src: url('Fontin-Regular.otf') format('opentype'); }

</style>

Comment from ‘Nicholas’, webdirections.org/blog/the-return-of-font-embedding-to-the-web

Page 60: Progressive Enhancement & Intentional Degradation 2

4We have issues

Page 61: Progressive Enhancement & Intentional Degradation 2

The issues

Page 62: Progressive Enhancement & Intentional Degradation 2

The issues

Protection is needed for font foundries to counteract font piracy (as with EOT).

Page 63: Progressive Enhancement & Intentional Degradation 2

The issues

Protection is needed for font foundries to counteract font piracy (as with EOT).

How do we cope with licenses? Mozilla proposes including license data in HTTP headers.

Page 64: Progressive Enhancement & Intentional Degradation 2

The issues

Protection is needed for font foundries to counteract font piracy (as with EOT).

How do we cope with licenses? Mozilla proposes including license data in HTTP headers.

More fonts need to be made available so that the choice can improve. In its current state, the limited choice is turning into not much more than an alternative list of web-safe fonts.

Page 65: Progressive Enhancement & Intentional Degradation 2

What needs to happen?

Page 66: Progressive Enhancement & Intentional Degradation 2

What needs to happen?

Font foundries need to be protected by the technology, as they are with EOT.

Page 67: Progressive Enhancement & Intentional Degradation 2

What needs to happen?

Font foundries need to be protected by the technology, as they are with EOT.

Font embedding is the path to typographic enlightenment on the web... when it eventually receives multiple browser support.

Page 68: Progressive Enhancement & Intentional Degradation 2

What needs to happen?

Font foundries need to be protected by the technology, as they are with EOT.

Font embedding is the path to typographic enlightenment on the web... when it eventually receives multiple browser support.

Start using font embedding now!

Page 69: Progressive Enhancement & Intentional Degradation 2

5New possibilities with CSS3

Page 70: Progressive Enhancement & Intentional Degradation 2

I won’t say too much

Page 71: Progressive Enhancement & Intentional Degradation 2

I won’t say too much

But there are some exciting bits...

Page 72: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Page 73: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layout

Page 75: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layoutBackgrounds

Page 76: Progressive Enhancement & Intentional Degradation 2

div.shoutbox {background: url(top.gif) top left no-repeat, url(middle.gif) left repeat-y, url(bottom.gif) bottom left no-repeat }

Multiple background images

Page 77: Progressive Enhancement & Intentional Degradation 2

Multiple background images

div.shoutbox {background: url(top.gif) top left no-repeat, url(middle.gif) left repeat-y, url(bottom.gif) bottom left no-repeat }

Page 78: Progressive Enhancement & Intentional Degradation 2

Multiple background images

div.shoutbox {background: url(top.gif) top left no-repeat, url(middle.gif) left repeat-y, url(bottom.gif) bottom left no-repeat }

Page 79: Progressive Enhancement & Intentional Degradation 2

Multiple background images

div.shoutbox {background: url(top.gif) top left no-repeat, url(middle.gif) left repeat-y, url(bottom.gif) bottom left no-repeat }

Page 80: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layoutBackgroundsBorders

Page 81: Progressive Enhancement & Intentional Degradation 2

Borders: radius

div.vcard { border-radius:20px; -webkit-border-radius:20px; -moz-border-radius:20px; }

Page 82: Progressive Enhancement & Intentional Degradation 2

Borders: image

div.vcard { border-image:url(border.png) 10 10 10 10 round round; }

Page 83: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layoutBackgroundsBordersBox shadows

Page 84: Progressive Enhancement & Intentional Degradation 2

Borders: image

div.info { box-shadow:10px 10px 5px #888; }

Page 85: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layoutBackgroundsBordersBox shadowsMulti-column layout

Page 86: Progressive Enhancement & Intentional Degradation 2

Multiple column layouts

div.article { column-count:2; column-gap:20px }

Page 87: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layoutBackgroundsBordersBox shadowsMulti-column layoutSelectors

Page 88: Progressive Enhancement & Intentional Degradation 2

Nth child selectors

tr:nth-child(odd) td { background:#999 }

Page 89: Progressive Enhancement & Intentional Degradation 2

Some of the new features

Advanced layoutBackgroundsBordersBox shadowsMulti-column layoutSelectorsText shadows

Page 90: Progressive Enhancement & Intentional Degradation 2

Text shadows

p { text-shadow:1px 2px 1px #000 }

Page 91: Progressive Enhancement & Intentional Degradation 2

6Start using it NOW

Page 92: Progressive Enhancement & Intentional Degradation 2

dictionary.reference.com/browse/progressive

“”

Progressive

Favoring or advocating progress, change, improvement, or reform, as opposed to wishing to maintain things as they are.

Page 93: Progressive Enhancement & Intentional Degradation 2

Thomas Silkjær theundersigned.net (Safari)

Page 94: Progressive Enhancement & Intentional Degradation 2

ul.gallery li:hover { webkit-transform:rotate:(-2.5deg); }

theundersigned.net/wp-content/themes/default/style.css

Page 95: Progressive Enhancement & Intentional Degradation 2

Thomas Silkjær theundersigned.net (Firefox)

Page 96: Progressive Enhancement & Intentional Degradation 2

Sam Brown sam.brown.tc

Page 97: Progressive Enhancement & Intentional Degradation 2

24 Ways 24ways.org

Page 98: Progressive Enhancement & Intentional Degradation 2

Tim Van Damme timvandamme.com

Page 99: Progressive Enhancement & Intentional Degradation 2

Web Directions North north.webdirections.org

Page 100: Progressive Enhancement & Intentional Degradation 2

Website don’t need to look the same in every browser

Page 101: Progressive Enhancement & Intentional Degradation 2

Website don’t need to look the same in every browser

At the basic level, your site should look acceptable in most browsers, especially the target ones

Page 102: Progressive Enhancement & Intentional Degradation 2

Website don’t need to look the same in every browser

At the basic level, your site should look acceptable in most browsers, especially the target ones

Add enhancements for newer browsers

Page 103: Progressive Enhancement & Intentional Degradation 2

Website don’t need to look the same in every browser

At the basic level, your site should look acceptable in most browsers, especially the target ones

Add enhancements for newer browsers

Don’t fear degradation - plan for it

Page 104: Progressive Enhancement & Intentional Degradation 2

7Controversial parting thought

Page 105: Progressive Enhancement & Intentional Degradation 2

Validationis irrelevant

Page 106: Progressive Enhancement & Intentional Degradation 2

Yes, yes, bear with me...

Page 107: Progressive Enhancement & Intentional Degradation 2

Yes, yes, bear with me...

New techniques won’t validate...

Page 108: Progressive Enhancement & Intentional Degradation 2

Validation errors jigsaw.w3.org/css-validator

Page 109: Progressive Enhancement & Intentional Degradation 2

Yes, yes, bear with me...

New techniques won’t validate...

... and it doesn’t matter!

Page 110: Progressive Enhancement & Intentional Degradation 2

Yes, yes, bear with me...

New techniques won’t validate...

... and it doesn’t matter!

Recognise the value of intentional invalidation

Page 111: Progressive Enhancement & Intentional Degradation 2

Jon Hicks hicksdesign.co.uk/journal

Page 112: Progressive Enhancement & Intentional Degradation 2

Jon Hicks hicksdesign.co.uk/journal

Page 113: Progressive Enhancement & Intentional Degradation 2

#tops b { display:block; float:right; width:333px; height:15px; background:url(/images/paulsmith.gif) no-repeat; }

hicksdesign.co.uk/css/layout-9.css

Page 114: Progressive Enhancement & Intentional Degradation 2

<b>

Page 115: Progressive Enhancement & Intentional Degradation 2

Yes, yes, bear with me...

New techniques won’t validate...

... and it doesn’t matter!

Recognise the value of intentional invalidation

Validation does not equal conformity to Web Standards: you can build a site with tables and a complete lack of semantics yet still have it validate

Page 116: Progressive Enhancement & Intentional Degradation 2

Validation

Page 117: Progressive Enhancement & Intentional Degradation 2

does

Page 118: Progressive Enhancement & Intentional Degradation 2

not

Page 119: Progressive Enhancement & Intentional Degradation 2

equal

Page 120: Progressive Enhancement & Intentional Degradation 2

conformity

Page 121: Progressive Enhancement & Intentional Degradation 2

to

Page 122: Progressive Enhancement & Intentional Degradation 2

Web

Page 123: Progressive Enhancement & Intentional Degradation 2

Standards

Page 124: Progressive Enhancement & Intentional Degradation 2

Further reading, part 1CSS3.info css3.info

Design Shack: Introduction to CSS3designshack.co.uk/tutorials/introduction-to-css3-part-1-what-is-it

Elliot Jay Stocks Progressive Enhancement & Intentional Degradation 1elliotjaystocks.com/geeknight

Jina Bolton: Creating Sexy Stylesheetshttp://creatingsexystylesheets.com

Jina Bolton: CSS3 and what could becreatingsexystylesheets.com/css3andwhatcouldbe.zip

Jon Allsopp: The return of font embedding to the web?webdirections.org/blog/the-return-of-font-embedding-to-the-web

Jon Allsopp: Ubiquitous web font embedding just got a step closerwebdirections.org/blog/ubiquitous-web-font-embedding-just-got-a-step-closer

Jon Tan: @font-face in IE: Making Web Fonts Workjontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work

Microsoft: Font embedding in IE4msdn.microsoft.com/en-us/library/ms533034.aspx

Microsoft: WEFT 3microsoft.com/typography/web/embedding/weft3/default.htm

Richard Rutter: The future of web font embeddingclagnut.com/blog/2166

Page 125: Progressive Enhancement & Intentional Degradation 2

Further reading, part 2W3C: CSS3 module: Web Fontsw3.org/TR/css3-webfonts

W3C: For & against standardizing font embeddingw3.org/Fonts/Misc/eot-report-2008

Web Fonts: Fonts available for @font-face embeddingwebfonts.info/wiki/index.php?title=Fonts_available_for_%40font-face_embedding

Page 126: Progressive Enhancement & Intentional Degradation 2

Sexy Web Designby Elliot Jay StocksExpert reviewers: Jina Bolton & Dan Rubin

Published by SitePoint in March

Shameless plug!

Page 127: Progressive Enhancement & Intentional Degradation 2

Thank you!

elliotjaystocks.com | twitter.com/elliotjaystocks

Cover background image by Samantha Cliffe - samanthacliffe.comChapter background image from ilovetypography.com/lovePin-ups image by Mauren Veras - flickr.com/photos/mauren/2298724158Additional imagery by me