typography and user experience - ux craft 2014

63

Upload: me

Post on 28-Nov-2014

673 views

Category:

Design


0 download

DESCRIPTION

Web typography and UX

TRANSCRIPT

Page 1: Typography and user experience - UX Craft 2014
Page 2: Typography and user experience - UX Craft 2014

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

JUSTIN SLACK

Improving typography for

an improved user experience

Page 3: Typography and user experience - UX Craft 2014

Who am I?

Design and front-end lead at New Media Labs

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 4: Typography and user experience - UX Craft 2014

“Web Design is 95%

Typography”

S TA R T W I T H A Q U O T E

Oliver Reichenstein,

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

2006

Page 5: Typography and user experience - UX Craft 2014

Web fonts will bring a typographic revolution to

web design as great as desktop publishing was to

print design

M A K E A P R E D I C T I O N

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 6: Typography and user experience - UX Craft 2014

“Optimizing typography is optimizing

readability, accessibility, usability,

overall graphic balance. Organizing

blocks of text, isn’t that what graphic

designers, usability specialists,

information architects do? So why is

it such a neglected topic?”

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Oliver Reichenstein, 2006

Page 7: Typography and user experience - UX Craft 2014

W H Y H A S T Y P O G R A P H Y B E E N N E G L E C T E D ?

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

• The first argument against rich typography online used to be that there are only a few fonts available

• The second argument used to be that screen resolutions are too low, which makes it hard to read pixelated or anti-aliased fonts in the first place

• Browser support • Copyright issues • It’s easy to use defaults

Page 8: Typography and user experience - UX Craft 2014

Much of the web is about reading

T Y P O G R A P H Y - W H Y S H O U L D W E C A R E ?

“Designers will benefit from [approaching] their work now and again as being written rather than assembled.”

!

Dean Allen, A List Apart, 2001

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Good typography enhances that experience

Page 9: Typography and user experience - UX Craft 2014

dizzying array of typographic terms

baseline, cap height, condensed, descender, drop cap, em, em space, em quad, hanging indent, kerning, discretionary ligature, swash, smallcaps, stylistic sets,

x-height, tracking, bowl, ascender, accents, alternates, counter, diacritics, hinting, leading, terminals, lining figures ...

W H E R E D O W E S TA R T ?

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 10: Typography and user experience - UX Craft 2014

A N AT O M Y O F A T Y P E FA C E

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

HandgloveryTerminal

Bracket Counter Link/ Neck Loop/

Lobe

Axis Finial

Tail

Descender

Eye

AscenderStem Shoulder Serif

CAP HEIGHTX-HEIGHT

BASELINE

Page 11: Typography and user experience - UX Craft 2014

W H E R E D O W E M A K E M I S TA K E S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

• Text is too small • Lines are too long • Not enough whitespace • Poor layout consideration of titles and subtitles • Links are not clear (missing active and visited states

most of the time) • Text is not treated as part of the interface but in a

decorative fashion • Poor typeface choices

Page 12: Typography and user experience - UX Craft 2014

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

The Mail and GuardianFont: Open Sans Font size: 13px Line-height: 22px/1.7 Margin: 10px

Page 13: Typography and user experience - UX Craft 2014

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

The GuardianFont: Guardian Text Egyptian Web Font size: 16px/100% Line-height: 24px/1.5 Margin: 16px

Page 14: Typography and user experience - UX Craft 2014

A L L S C R E E N F O N T S W E R E B I T M A P S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 15: Typography and user experience - UX Craft 2014

the font warsAdobe - Type 1 (Postscript)

True Type - Microsoft (and Apple) Apple Advanced Typography (AAT or GX typography)

Open Type (™Microsoft and Adobe)

F O N T F O R M AT S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 16: Typography and user experience - UX Craft 2014

why OpenType?OpenType offers an accessible and advanced typographic toolset. !

It improves on PostScript and TrueType in a number of ways: One style in one file While Postscript is limited to 256 characters in a file, a single OpenType file can contain 65,535 characters or glyphs This allows for extensive language support as well as space for advanced typographic features

W H O W O N ?

OpenType

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 17: Typography and user experience - UX Craft 2014

FF METAT R U E T Y P E O P E N T Y P E C O M PA R I S O N

P O S T S C R I P T O P E N T Y P E

4 styles 4 styles

360 files 4 files

23.6 MB 676 KB

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 18: Typography and user experience - UX Craft 2014

@font-face

W H Y S H O U L D W E C A R E ?

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 19: Typography and user experience - UX Craft 2014

Arial Helvetica!Georgia Courier!

Times New Roman

W E B S A F E F O N T S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 20: Typography and user experience - UX Craft 2014

@ f o n t - f a c e O R I G I N S A N D S U P P O R T

The first browser to support embedded type was Netscape Navigator 4 in 1994

<head> <link rel=”FONTDEF” src=”myfont.pfr”>

</head> !<body>

<font face=”myfont”>Type</font> </body>

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 21: Typography and user experience - UX Craft 2014

@ f o n t - f a c e O R I G I N S A N D S U P P O R T

Source: Jake Archibald

1997

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 22: Typography and user experience - UX Craft 2014

IEInternet Explorer has supported font embedding via @fontface since 1997

@ f o n t - f a c e O R I G I N S A N D S U P P O R T

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

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 23: Typography and user experience - UX Craft 2014

two technologiesMicrosoft Typography .eot via @fontface

E M B E D D I N G F O N T S I N T H E D A R K A G E S ( T H E 9 0 ’ S )

Bitstream TrueDoc™ .pfr font file via (seriously invalid) LINK REL=fontdef SRC="myfont.pfr"

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 24: Typography and user experience - UX Craft 2014

problems (we have them)Microsoft Typography

.eot is proprietary and requires a browser plugin to render in Netscape

E M B E D D I N G F O N S I N T H E D A R K A G E S ( T H E 9 0 ’ S )

Bitstream TrueDoc(TM)

.pfr font requires an active-x control to run in IE

Manual refresh required after activating active-x

Netscape 6 = open source

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 25: Typography and user experience - UX Craft 2014

@ F O N T FA C E B R O W S E R S U P P O R T

1997 2004 2008 2010

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 26: Typography and user experience - UX Craft 2014

Four font file types

@ f o n t - f a c e F O R M AT S

E O T Proprietary Microsoft format - rejected by W3C

S V G A simple means of embedding glyph information for rendering type

T T F/O T F Standard font format

W O F F Developed specifically for embedding fonts in web pages

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 27: Typography and user experience - UX Craft 2014

Internet Explorer

F O N T F O R M AT S U P P O R T

V E R S I O N W O F F E O T T T F/O T F S V G

6-8 No Yes No No

9-10 Yes Yes No No

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 28: Typography and user experience - UX Craft 2014

Firefox

F O N T F O R M AT S U P P O R T

V E R S I O N W O F F E O T T T F/O T F S V G

4-21 Yes No Yes No

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 29: Typography and user experience - UX Craft 2014

Safari

F O N T F O R M AT S U P P O R T

V E R S I O N W O F F E O T T T F/O T F S V G

5.1-6 Yes No Yes Yes

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 30: Typography and user experience - UX Craft 2014

Opera

F O N T F O R M AT S U P P O R T

V E R S I O N W O F F E O T T T F/O T F S V G

12 Yes No Yes No

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 31: Typography and user experience - UX Craft 2014

Chrome

F O N T F O R M AT S U P P O R T

V E R S I O N W O F F E O T T T F/O T F S V G

27 Yes No Yes No

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 32: Typography and user experience - UX Craft 2014

support all the browsers@ f o n t - f a c e S Y N TA X

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

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 33: Typography and user experience - UX Craft 2014

WOFF will winE M E R G I N G S TA N D A R D

WOFF uses a compressed version of the same table-based sfnt structure used by TrueType, OpenType, and Open Font Format, but adds metadata and private-use data structures, including predefined fields allowing foundries and vendors to provide license information if desired.

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 34: Typography and user experience - UX Craft 2014

WOFF advantagesE M E R G I N G S TA N D A R D

Font data is compressed. Sites using WOFF will use less bandwidth and will load faster than if they used equivalent uncompressed TrueType or OpenType files.

Many font vendors that are unwilling to license their TrueType or OpenType format fonts for use on the web will license WOFF format fonts.

Both proprietary and free-software browser vendors support the WOFF format.

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 35: Typography and user experience - UX Craft 2014

current browsers

W O F F S U P P O R T

I E 9 / 1 0 F I R E F OX C H R O M E S A FA R I O P E R A

Yes Yes Yes Yes Yes

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 36: Typography and user experience - UX Craft 2014

mobile browsers

W O F F S U P P O R T

I O S B L A C K B E R RYO P E R A

M O B I L EC H R O M E

F I R E F OX ( A n d r o i d )

A N D R O I D B R O W S E R

O P E R A M I N I *

Yes (5) Yes (7) Yes (10) Yes (27) Yes (22) Yes (4.4) No (7)

* no @font-face support

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 37: Typography and user experience - UX Craft 2014

hello rich typography

O P E N T Y P E F E AT U R E S

Support widely expanded character sets and layout features which provide rich linguistic support and advanced typographic control

Using one font file only for its entire glyph, metric and bitmap data, OpenType fonts simplify font management

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 38: Typography and user experience - UX Craft 2014

hello rich typography

O P E N T Y P E F E AT U R E S

Based on the Unicode Standard, a multi-byte character encoding that covers nearly all the world’s languages.

Includes non-standard glyphs, such as old-style figures, tabular figures, small capitals, fractions, swashes, superiors, inferiors, titling letters, contextual and stylistic alternates, a full range of ligatures, symbols and ornaments.

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 39: Typography and user experience - UX Craft 2014

CSS fonts module level three

O P E N T Y P E F E AT U R E S I N C S S

Working draft updated 3 October 2013

Introduces Font Feature Properties

Expands the font-variant property for CSS3

It now functions as a shorthand for a set of properties that provide control over stylistic font features

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 40: Typography and user experience - UX Craft 2014

syntax (the real thing)

O P E N T Y P E F E AT U R E S I N C S S

.i-have-a-class { font-family: 'myfont'; font-variant-ligatures: 'common-lig-values'; }

!

Values: normal, none, common-lig-values, discretionary-lig-values, historical-lig-values, contextual-alt-values

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 41: Typography and user experience - UX Craft 2014

dizzying array of OpenType features

AALT, CALT, SALT, LIGA, DLIG, CLIG, HIST, HLIG, UNIC, SMCP, C2SC, PCAP, TITL, SWSH, SS01-20, FRAC, AFRC, ORD, NUMR, DNUM, SINF,

SUPS, SUBS, ONUM, PNUM, TNUM, ORNM ...

O P E N T Y P E F E AT U R E S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 42: Typography and user experience - UX Craft 2014

the whole listLanguage-specific display Kerning Ligatures Sub and superscript Capitalization Numerical formatting

C S S F O N T F E AT U R E S

Alternates and swashes Font specific values East Asian text rendering Overall shorthand for font rendering Low level settings control Font language override

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 43: Typography and user experience - UX Craft 2014

awesome!

um ... no

C S S F O N T F E AT U R E S

let’s use them all now

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 44: Typography and user experience - UX Craft 2014

browser support

none

C S S F O N T F E AT U R E S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 45: Typography and user experience - UX Craft 2014

well then ...

why are you wasting our time?

C S S F O N T F E AT U R E S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 46: Typography and user experience - UX Craft 2014

right now we have

support for low-level OpenType features via the font-feature-settings property

C S S F O N T F E AT U R E S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 47: Typography and user experience - UX Craft 2014

syntax (not the real thing)

O P E N T Y P E F E AT U R E S I N C S S

.i-have-a-class { font-family: 'myfont'; font-feature-settings: 'smcp’, ‘swsh' 2; }

!

Values: the above syntax enables “Small Caps” and “Swashes”. The value is an integer. A value of zero would turn these features off.

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 48: Typography and user experience - UX Craft 2014

current browsers

B R O W S E R S U P P O R T

I E 1 0 F I R E F OX C H R O M E S A FA R I O P E R A

Yes* Yes* Yes* Partial* Yes

* vendor prefixed

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 49: Typography and user experience - UX Craft 2014

example

O P E N T Y P E F E AT U R E S I N C S S

.dlig { font-family: 'myfont'; font-feature-settings: 'dlig’; }

<p class=”dlig”> The quick brown fox jumps over lazy dog </p>

Page 50: Typography and user experience - UX Craft 2014

result

O P E N T Y P E F E AT U R E S I N C S S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ J U S T I N S L A C K . C O M

Page 51: Typography and user experience - UX Craft 2014

example

O P E N T Y P E F E AT U R E S I N C S S

. ss05 { font-family: 'myfont'; font-feature-settings: 'ss05’; }

<p class=”ss05”> The quick brown fox jumps over lazy dog </p>

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 52: Typography and user experience - UX Craft 2014

result

O P E N T Y P E F E AT U R E S I N C S S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 53: Typography and user experience - UX Craft 2014

example

O P E N T Y P E F E AT U R E S I N C S S

. cswh { font-family: 'myfont'; font-feature-settings: 'cswh’; }

<p class=”cswh”> The quick brown fox jumps over the lazy dog </p>

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 54: Typography and user experience - UX Craft 2014

result

O P E N T Y P E F E AT U R E S I N C S S

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 55: Typography and user experience - UX Craft 2014

example

O P E N T Y P E F E AT U R E S I N C S S

.tnum { font-family: 'myfont'; font-feature-settings: 'tnum’; }

<td class=”tnum”> The quick brown fox jumps over lazy dog </td>

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 56: Typography and user experience - UX Craft 2014

resultO P E N T Y P E F E AT U R E S I N C S S

“default” =

“tnum” =

“lnum” =

“default” =

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 57: Typography and user experience - UX Craft 2014

Not the same thing

R E A D A B I L I T Y V E R S U S L E G I B I L I T Y

Legibility = I can interpret this !

Readability = an emotional connection with the act.

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 58: Typography and user experience - UX Craft 2014

Two opposing positions

R E A D A B I L I T Y V E R S U S L E G I B I L I T Y

“I can write the word 'dog' with any typeface and it doesn't have to look like a dog. But there are people that [think that] when they write 'dog' it should bark.” !

Massimo Vignelli

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 59: Typography and user experience - UX Craft 2014

potential pitfalls

C AV E AT S

Just because we have lots of typefaces ... more fonts does not mean better typography !

Many current fonts are not optimised for the web !

Incomplete character sets, sub-optimal line heights, poor kerning !

Additional load time

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 60: Typography and user experience - UX Craft 2014

do

C AV E AT S

Settle on a typeface as early as possible !

!

Get type in the browser as soon as possible !

Optimize loading on mobile !

Pay careful attention to line widths at breakpoints !

Use a baseline grid

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 61: Typography and user experience - UX Craft 2014

do

C AV E AT S

Design for and use existing CSS properties that have widespread support !

Organise a design with regards to the message and with readability in mind !

Consider a hosted solution

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 62: Typography and user experience - UX Craft 2014

Thanks for

listening !

Questions?

J U S T I N S L A C K . C O M • @ U R B A N R E N E WA L • J U S T I N @ N E W M E D I A L A B S . C O . Z A

Page 63: Typography and user experience - UX Craft 2014

R E S O U R C E S

Web Design is 95% Typography http://ia.net/blog/the-web-is-all-about-typography-period/ Reading Design http://alistapart.com/article/readingdesign What is Open Type? http://www.fontshop.com/opentype/ In your @fontface http://www.slideshare.net/jaffathecake/in-your-fontface CSS3 font tester http://clagnut.com/sandbox/css3/ Official specification (latest draft) http://dev.w3.org/csswg/css-fonts/

V I S I T U S O N L I N E YO U R W E B S I T E U R L • F O L L O W U S O N YO U R T W I T T E R U R L • F R I E N D U S O N YO U R FA C E B O O K U R L