SlideShare a Scribd company logo
Dominating the
Web Typography
Eduardo Shiota Yasuda — @shiota Conferência CSS Brasil
Hello!
twitter.com/shiota
github.com/eshiota
slideshare.net/eshiota
contato@eshiota.com
Dominating the Web Typography
I Typography
Typography is everywhere.
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
We gotta remember the
roots of what we do.
15.000 BC – 12.500 BC
Altamira & Lascaux
3.000 BC – 1.500 BC
Pictographs
1.500 BC
Phoenician alphabet
750 BC
Greek alphabet
146 BC
Roman alphabet, “Capitalis quadrata”
0
Better materials, “Capitalis rustica”
4th – 5th centuries
Uncials and semi-uncials
8th century
Carolingian minuscules
12th century
Apex of goth art and Middle Ages
15th – 16th centuries
Renaissance, Gutenberg press, “Cursiva humanista”, type foundries
19th century
Industrial Revolution, linotype, Art Nouveau, display types
20th century
Modern Design, Avant-garde, Bauhaus, sans-serif types, digital typography
21th century
Web typography and CSS
The basics
Basics
Classification
Most of the classification
systems agree with these
type categories:
Serif types
Museo
The quick brown fox jumps
over the lazy dog.
Meta Serif
The quick brown fox jumps
over the lazy dog.
Times New Roman
The quick brown fox jumps
over the lazy dog.
Sans serif types
Futura
The quick brown fox jumps
over the lazy dog.
Museo Sans
The quick brown fox jumps
over the lazy dog.
Helvetica
The quick brown fox jumps
over the lazy dog.
Gothic types
Fette Fraktur
The quick brown fox jumps
over the lazy dog.
Goudy Text
The quick brown fox jumps
over the lazy dog.
Wilhelm Klingspor Gotisch
The quick brown fox jumps
over the lazy dog.
Cursive types
Lucida Calligraphy
The quick brown fox jumps
over the lazy dog.
Mistral
The quick brown fox jumps over
the lazy dog.
Apple Chancery
The quick brown fox jumps
over the lazy dog.
Display types
Comic Sans
The quick brown fox jumps
over the lazy dog.
Sketch Rockwell
The quick brown fox
jumps over the lazy dog.
GodOfWar
The quick brown fox jumps
over the lazy dog.
Dingbats
Bodoni Ornaments
The quick brown fox jumps
over the lazy dog.
Travel Icons
The quick brown fox jumps
over the lazy dog.
Wingdings
The quick brown fox jumps
over the lazy dog.
On the CSS, you may
choose generic families
as fallbacks.
.my-serif-text {
font-family: "Meta Serif", Times, serif;
}
.my-sans-serif-text {
font-family: "Proxima Nova", Arial, sans-serif;
}
.my-monospace-text {
font-family: Monaco, "Courier New", monospace;
}
.my-cursive-text {
font-family: "Zapf Chancery", "Brush Script", cursive;
}
.my-fantasy-text {
font-family: "Sketch Rockwell", Papyrus, fantasy;
}
Basics
Anatomy of a type
Dominating the Web Typography
baseline
font size
Typography
baseline
descender height
x-height
cap height
ascender height
Typography
T
y
p
o
g
r
a
p
h
y
Basics
Units
Physical units
To deal with physical units,
you can’t rely on a screen.
pt picas millimetres inches
12 1 4.22 1/6
A4 (29.7cm × 21.0cm)
Pixel (px)
To deal with screens, you must
understand what are physical
and reference pixels.
A physical pixel is a physical
point on the display.
Dominating the Web Typography
A reference pixel depends
on the device, software and
user settings.
Dominating the Web Typography
A 16px font on a
smartphone screen won’t
have as many millimetres as
on a desktop screen.
Dominating the Web Typography
Change, test, use media
queries, test again.
em unit (em)
“em” is a relative unit used
since the movable types.
It represents a type’s
full body size.
1 em
16px
1 em
margin-right: 1em;
16px
It’s always relative to its
context’s font size.
.wrapper {
font-size: 16px;
}
.parent {
font-size: 1.5em;
}
.child {
font-size: .5em;
}
Root em unit (rem)
“rem” is like “em” but always
relative to the root (html).
html {
font-size: 16px;
}
.wrapper {
font-size: 12px;
}
.parent {
font-size: 1.5rem;
}
.child {
font-size: 0.5rem;
}
For most of browsers and
cases, the default root
font size is 16px.
html {
font-size: 16px;
}
.wrapper {
font-size: 12px;
}
.parent {
font-size: 1.5rem;
}
.child {
font-size: 0.5rem;
}
html {
font-size: 100%;
}
.wrapper {
font-size: 12px;
}
.parent {
font-size: 1.5rem;
}
.child {
font-size: 0.5rem;
}
Rhythm
The way you space your
characters and text dictates
how a person will read it.
Rhythm
Line height
Line height is the distance
between each line of types.
The quick fox jumps
over the dog 0 pixels
Meta Serif 102px/102px
The quick fox jumps
over the dog
Meta Serif 102px/144px
42 pixels
A low line height makes the
text too difficult to read.
Helvetica 32px/32px
“The Guide says that the best drink in existence is the Pan
Galactic Gargle Blaster. It says that the effect of a Pan Galactic
Gargle Blaster is like having your brains smashed out by a slice
of lemon wrapped round a large gold brick.”
A large line height makes the
paragraph loose cohesion.
Helvetica 32px/96px
“The Guide says that the best drink in existence is the Pan
Galactic Gargle Blaster. It says that the effect of a Pan Galactic
Gargle Blaster is like having your brains smashed out by a slice
of lemon wrapped round a large gold brick.”
Find a comfortable proportion
through trial-and-error.
Helvetica 32px/48px
“The Guide says that the best drink in existence is the Pan
Galactic Gargle Blaster. It says that the effect of a Pan Galactic
Gargle Blaster is like having your brains smashed out by a slice
of lemon wrapped round a large gold brick.”
Each typeface might require a
different line height setting.
Bembo 32px/48px
“The Guide says that the best drink in existence is the Pan Galactic
Gargle Blaster. It says that the effect of a Pan Galactic Gargle Blaster is
like having your brains smashed out by a slice of lemon wrapped
round a large gold brick.”
Caslon 32px/48px
“The Guide says that the best drink in existence is the Pan
Galactic Gargle Blaster. It says that the effect of a Pan
Galactic Gargle Blaster is like having your brains smashed
out by a slice of lemon wrapped round a large gold brick.”
Rhythm
Baseline
Use a consistent vertical
proportion by following
a baseline.
9 reasons why cats will conquer the world. The number 5
will surprise you!
“More importantly, a towel has immense psychological value.
For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will
automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass,
map, ball of string, gnat spray, wet-weather gear, space suit etc., etc.
Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker
might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the
Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a
man to be reckoned with.”
9 reasons why cats will conquer the world. The number 5
will surprise you!
“More importantly, a towel has immense psychological value.
For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will
automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass,
map, ball of string, gnat spray, wet-weather gear, space suit etc., etc.
Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker
might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the
Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a
man to be reckoned with.”
Choose a line height for a
baseline, and make all
vertical values derive from it.
/* baseline = 24px */
body {
font-size: 16px;
line-height: 24px; /* baseline */
}
.article-title {
font-size: 32px;
line-height: 48px; /* 2 × baseline */
}
.article-excerpt {
font-size: 18px;
line-height: 24px; /* baseline */
}
img {
max-height: 312px; /* 13 × baseline */
}
p {
margin-bottom: 12px; /* 0.5 × baseline */
}
If you pre-process your CSS,
you ensure a consistent
typography using variables.
// _variables.scss
$base-font-size: 16px;
$baseline: 24px;
// On your project:
body {
font-size: $base-font-size;
line-height: ($baseline/$base-font-size); // 1.5
}
.article-title {
font-size: 2*$base-font-size;
line-height: 2*$baseline;
}
.article-excerpt {
font-size: 18px;
line-height: $baseline;
}
img {
max-height: 13*$baseline;
}
p {
margin-bottom: 0.5*$baseline;
}
Be aware that each browser
has its own baseline.
Rhythm
Letter spacing/tracking
Letter spacing is the
whitespace between
each single type.
Typography
Typography
letter-spacing: 10px;
Typography
letter-spacing: -10px;
The use of letter-spacing is
recommended for titles only.
Epic Movie Title
Epic Movie Title
Rhythm
Kerning
Kerning is a fine-tuning
between specific pairs
of characters.
Dominating the Web Typography
Task
The browser default is
automatically
enabling/disabling it.
Dominating the Web Typography
.kerning {
font-kerning: normal;
}
32+ 34+ 7+ 10+
Rhythm
Text indentation
You can manipulate the
text’s indentation, which
applies to its first line.
More importantly, a towel has immense psychological value.
For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his
towel with him, he will automatically assume that he is also in possession of a
toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat
spray, wet-weather gear, space suit etc., etc.
Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen
other items that the hitchhiker might have accidentally "lost.". What the strag will think
is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it,
struggle against terrible odds, win through and still know where his towel is, is clearly a
man to be reckoned with.
More importantly, a towel has immense psychological value.
For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has
his towel with him, he will automatically assume that he is also in possession of a
toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat
spray, wet-weather gear, space suit etc., etc.
Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen
other items that the hitchhiker might have accidentally "lost.". What the strag will think
is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it,
struggle against terrible odds, win through and still know where his towel is, is clearly a
man to be reckoned with.
.post p {
text-indent: 2em;
}
For long texts, you can
skip the indentation on
the first paragraph.
More importantly, a towel has immense psychological value.
For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has
his towel with him, he will automatically assume that he is also in possession of a
toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat
spray, wet-weather gear, space suit etc., etc.
Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen
other items that the hitchhiker might have accidentally "lost.". What the strag will think
is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it,
struggle against terrible odds, win through and still know where his towel is, is clearly a
man to be reckoned with.
.post p {
text-indent: 2em;
}
.post p:first-of-type {
text-indent: 0;
}
More importantly, a towel has immense psychological value.
For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has
his towel with him, he will automatically assume that he is also in possession of a
toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat
spray, wet-weather gear, space suit etc., etc.
Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen
other items that the hitchhiker might have accidentally "lost.". What the strag will think
is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it,
struggle against terrible odds, win through and still know where his towel is, is clearly a
man to be reckoned with.
.post p + p {
text-indent: 2em;
}
Text styling
You can use CSS rules to
properly style your content,
like a well-authored book.
Styling
Titles & subtitles
Keep a clear hierarchy by
using different font sizes,
type faces and variants.
Dominating the Web Typography
Styling
Quotes
A quote block can be
highlighted with margins
and pseudo-elements.
Dominating the Web Typography
blockquote {
margin: 2em 6em;
font-size: 24px;
line-height: 1.5;
font-style: italic;
position: relative;
}
blockquote:before {
content: "“";
position: absolute;
left: -.75em;
top: 0;
font-size: 2.66em;
line-height: 1;
}
blockquote .author {
font-size: .75em;
line-height: 1.77;
}
Styling
Elevated caps
Explore CSS selectors to style
specific parts of the text.
.post p:first-of-type:first-letter {
font-size: 4.5em;
}
Styling
OpenType
OpenType fonts provide
features to control and tweak
the styles of your text.
Dominating the Web Typography
.my-class {
font-variant-caps: small-caps;
-moz-font-feature-settings: "smcp";
-ms-font-feature-settings: "smcp";
-webkit-font-feature-settings: "smcp";
font-feature-settings: "smcp";
}
33+ 4+ 10+
Dominating the Web Typography
Dominating the Web Typography
Composition
Composition
Grids and column sizes
The text should have
an ideal line length.
Dominating the Web Typography
A line should have between
60 and 70 characters.
Dominating the Web Typography
.post {
width: 744px;
margin: 0 auto;
}
Dominating the Web Typography
The column size should
respond to font size changes.
Dominating the Web Typography
The use of em-based column
width might solve the problem.
Dominating the Web Typography
Dominating the Web Typography
.post {
width: 31em;
margin: 0 auto;
}
Rendering
Rendering
Anti-aliasing and hinting
Font shapes are vectors
that are rasterised to be
displayed on pixels.
Hinting is a manual work
of tweaking sub-pixels to
maintain a font’s identity
and legibility on screen.
Dominating the Web Typography
Dominating the Web Typography
Anti-aliasing is an algorithm
used to smooth edges.
Each OS and browsers have a
different anti-aliasing and
hinting setting.
OS + Browser Hinting and AA
Win XP — IE6–8 GDI Grayscale
Win XP — IE6–8 ClearType GCI ClearType
IE9+ DirectWrite
Win XP Chrome GDI ClearType
Win XP Firefox GDI ClearType
Win 7+ Chrome 37+ DirectWrite
Win 7+ Firefox Depends?
OS X CoreText, ignores hinting
* Based on a lot of Google searches, might not be accurate
Test. On. Every. Browser.
Dominating the Web Typography
Choosing
Choosing
Sources
Choose a reliable source
for your font.
Dominating the Web Typography
The font must have a
proper unicode table,
kerning, hinting etc.
Also check for language
support, webfont license,
OpenType features.
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Dominating the Web Typography
Fonts are expensive
for a reason.
Choosing
Personalities
Each typeface has a story
and a personality, choose
one that match yours.
The quick brown fox
jumps over the lazy dog.
Bembo — based in engravings from 1495, renaissance style,
readable in small font sizes.
The quick brown fox
jumps over the lazy dog.
Helvetica — Symbol of the Modern Design, is readable,
international and neutral.
The quick brown fox
jumps over the lazy dog.
Museo — The modern, geometric shapes and the rounded, slab
serifs give a strong personality to this type.
Serifs have a refined look,
need less line height values,
and help maintaining a
cohesive text.
Dominating the Web Typography
Sans serifs have a modern
look, and increased
legibility on screens.
Dominating the Web Typography
Start simple, with a
readable body typeface.
Then format titles and
subtitles using different
weights and styles.
Choose a second typeface
for titles if needed. Avoid
going further than that.
Dominating the Web Typography
Choosing
Performance
Each font size is extra data
that must be downloaded.
Dominating the Web Typography
Measure the impact of
each added typeface.
Dominating the Web Typography
You’ll have to choose between
speed and non-FOUC.
Avoid loading custom typefaces
on mobile devices.
I Typography
We’ve only scratched
the surface.
We are the craftspeople
of the web.
Dominating the Web Typography
We should keep our
roots in place.
Dominating the Web Typography
Dominating the Web Typography
Further reading:
The Elements of Typographic Style
Robert Bringhurst
EN: http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881791326
PT-BR: http://editora.cosacnaify.com.br/ObraSinopse/11584/Elementos-do-estilo-tipogr%C3%A1fico---vers%C3%A3o-30.aspx
Thinking with Type
Ellen Lupton
EN: http://www.amazon.com/Thinking-Type-2nd-revised-expanded/dp/1568989695
PT-BR: http://editora.cosacnaify.com.br/ObraSinopse/1875/Pensar-com-tipos---2%C2%BA-edi%C3%A7%C3%A3o-%28Previs%C3%A3o-de-envio-a-
partir-de-200415%29.aspx
Type on Screen
Ellen Lupton
EN: http://www.amazon.com/Type-Screen-Critical-Designers-Developers/dp/161689170X
On Web Typography
Jason Santa Maria
EN: http://abookapart.com/products/on-web-typography
Type and Typography
Baines & Haslam
EN: http://www.amazon.co.uk/Type-Typography-Portfolio-Phil-Baines/dp/1856694372
Thanks!
twitter.com/shiota
github.com/eshiota
slideshare.net/eshiota
contato@eshiota.com

More Related Content

PDF
Beautiful Web Typography: 7 tips on de-sucking the web
PDF
The NEW Web Typography: Where the Sexy Is
PDF
Web Typography, A Long Dark
PDF
Beautiful Web Typography (#5)
KEY
BILL Hour: Try something new! (like Sass or Compass)
PDF
Typecurious: A Typography Crash Course
PDF
Making drupal beautiful with web fonts
ZIP
Interactive Branding Web Type Tips.Key
Beautiful Web Typography: 7 tips on de-sucking the web
The NEW Web Typography: Where the Sexy Is
Web Typography, A Long Dark
Beautiful Web Typography (#5)
BILL Hour: Try something new! (like Sass or Compass)
Typecurious: A Typography Crash Course
Making drupal beautiful with web fonts
Interactive Branding Web Type Tips.Key

Viewers also liked (15)

PDF
Front-end Culture @ Booking.com
PDF
Web Audio Band - Playing with a band in your browser
PDF
The BGs - Background CSS
PDF
Internationalisation: 2200+ different ways to view a website
PDF
Typography on the Web
PDF
Flexbox and Grid Layout: How you will structure layouts tomorrow.
PDF
Better Typography
PDF
Criando uma arquitetura de front-end do zero
PDF
Typography Fundamentals
PPSX
Basics of Typography
PDF
It's all about typography
PPTX
Typography ppt
PDF
5 Reasons Typography is Powerful
PDF
Typography Essentials: Part 1
PDF
Typography: The Backbone of Your Website
Front-end Culture @ Booking.com
Web Audio Band - Playing with a band in your browser
The BGs - Background CSS
Internationalisation: 2200+ different ways to view a website
Typography on the Web
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Better Typography
Criando uma arquitetura de front-end do zero
Typography Fundamentals
Basics of Typography
It's all about typography
Typography ppt
5 Reasons Typography is Powerful
Typography Essentials: Part 1
Typography: The Backbone of Your Website
Ad

Similar to Dominating the Web Typography (20)

PDF
[DevDay2019] Spacing and Typography, keys to a professional UI design - By Ng...
PDF
16. A Basic Introduction to Typography (Inglés) (Presentación) autor Northern...
PDF
Designing for words: elements of typography style for the web
PDF
Neoito — Typography for the web
PDF
Web Typography for Front End Developers
PDF
The Power of Typography
PDF
N-Share: Typography
PPTX
Typography
PPTX
Presentation 1 asgardia
PPTX
Chapter 12: CSS Part 2
PDF
PDF
Typography & WordPress
PPTX
Typography
PDF
Type on Screens: What to Consider and Why - Toshi Omagari, Monotype
PDF
Typography Basics Lecture-Design 101.pdf
PPT
Chapter 2
PPT
Chapter 2 : TEXT
PDF
Defining Typography. An introduction to exploring graphic design using typogr...
PDF
With Great Power, a lecture on web typography
[DevDay2019] Spacing and Typography, keys to a professional UI design - By Ng...
16. A Basic Introduction to Typography (Inglés) (Presentación) autor Northern...
Designing for words: elements of typography style for the web
Neoito — Typography for the web
Web Typography for Front End Developers
The Power of Typography
N-Share: Typography
Typography
Presentation 1 asgardia
Chapter 12: CSS Part 2
Typography & WordPress
Typography
Type on Screens: What to Consider and Why - Toshi Omagari, Monotype
Typography Basics Lecture-Design 101.pdf
Chapter 2
Chapter 2 : TEXT
Defining Typography. An introduction to exploring graphic design using typogr...
With Great Power, a lecture on web typography
Ad

More from Eduardo Shiota Yasuda (10)

PDF
The anatomy of an A/B Test - JSConf Colombia Workshop
PDF
RetroJS - Escrevendo músicas da era 8-bits com JavaScript e Web Audio API
PDF
Modular and Event-Driven JavaScript
PDF
Baby.com.br: Analisando, adaptando e melhorando a arquitetura da informação e...
PDF
Desafios do Desenvolvimento de Front-end em um e-commerce
PDF
Arquitetura de Front-end em Aplicações de Larga Escala
PDF
Responsive Web Design e a Ubiquidade da Web
PDF
User Experience para Developers
PDF
Sushi e Interfaces - PechaKucha São Paulo Vol. 8 + Inspire Japan
PDF
O Design e a Interface no mundo da Programação
The anatomy of an A/B Test - JSConf Colombia Workshop
RetroJS - Escrevendo músicas da era 8-bits com JavaScript e Web Audio API
Modular and Event-Driven JavaScript
Baby.com.br: Analisando, adaptando e melhorando a arquitetura da informação e...
Desafios do Desenvolvimento de Front-end em um e-commerce
Arquitetura de Front-end em Aplicações de Larga Escala
Responsive Web Design e a Ubiquidade da Web
User Experience para Developers
Sushi e Interfaces - PechaKucha São Paulo Vol. 8 + Inspire Japan
O Design e a Interface no mundo da Programação

Recently uploaded (20)

PPTX
Fundamental Principles of Visual Graphic Design.pptx
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PPTX
Implications Existing phase plan and its feasibility.pptx
PPTX
6- Architecture design complete (1).pptx
PDF
Urban Design Final Project-Context
PPTX
AD Bungalow Case studies Sem 2.pptxvwewev
PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PPTX
artificialintelligencedata driven analytics23.pptx
PPT
Package Design Design Kit 20100009 PWM IC by Bee Technologies
PPT
Machine printing techniques and plangi dyeing
PPTX
An introduction to AI in research and reference management
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PDF
Interior Structure and Construction A1 NGYANQI
PDF
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
PPTX
building Planning Overview for step wise design.pptx
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPTX
areprosthodontics and orthodonticsa text.pptx
Fundamental Principles of Visual Graphic Design.pptx
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
Implications Existing phase plan and its feasibility.pptx
6- Architecture design complete (1).pptx
Urban Design Final Project-Context
AD Bungalow Case studies Sem 2.pptxvwewev
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
mahatma gandhi bus terminal in india Case Study.pptx
artificialintelligencedata driven analytics23.pptx
Package Design Design Kit 20100009 PWM IC by Bee Technologies
Machine printing techniques and plangi dyeing
An introduction to AI in research and reference management
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Interior Structure and Construction A1 NGYANQI
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
building Planning Overview for step wise design.pptx
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
areprosthodontics and orthodonticsa text.pptx

Dominating the Web Typography

  • 1. Dominating the Web Typography Eduardo Shiota Yasuda — @shiota Conferência CSS Brasil
  • 13. We gotta remember the roots of what we do.
  • 14. 15.000 BC – 12.500 BC Altamira & Lascaux
  • 15. 3.000 BC – 1.500 BC Pictographs
  • 18. 146 BC Roman alphabet, “Capitalis quadrata”
  • 20. 4th – 5th centuries Uncials and semi-uncials
  • 22. 12th century Apex of goth art and Middle Ages
  • 23. 15th – 16th centuries Renaissance, Gutenberg press, “Cursiva humanista”, type foundries
  • 24. 19th century Industrial Revolution, linotype, Art Nouveau, display types
  • 25. 20th century Modern Design, Avant-garde, Bauhaus, sans-serif types, digital typography
  • 29. Most of the classification systems agree with these type categories:
  • 31. Museo The quick brown fox jumps over the lazy dog. Meta Serif The quick brown fox jumps over the lazy dog. Times New Roman The quick brown fox jumps over the lazy dog.
  • 33. Futura The quick brown fox jumps over the lazy dog. Museo Sans The quick brown fox jumps over the lazy dog. Helvetica The quick brown fox jumps over the lazy dog.
  • 35. Fette Fraktur The quick brown fox jumps over the lazy dog. Goudy Text The quick brown fox jumps over the lazy dog. Wilhelm Klingspor Gotisch The quick brown fox jumps over the lazy dog.
  • 37. Lucida Calligraphy The quick brown fox jumps over the lazy dog. Mistral The quick brown fox jumps over the lazy dog. Apple Chancery The quick brown fox jumps over the lazy dog.
  • 39. Comic Sans The quick brown fox jumps over the lazy dog. Sketch Rockwell The quick brown fox jumps over the lazy dog. GodOfWar The quick brown fox jumps over the lazy dog.
  • 41. Bodoni Ornaments The quick brown fox jumps over the lazy dog. Travel Icons The quick brown fox jumps over the lazy dog. Wingdings The quick brown fox jumps over the lazy dog.
  • 42. On the CSS, you may choose generic families as fallbacks.
  • 43. .my-serif-text { font-family: "Meta Serif", Times, serif; } .my-sans-serif-text { font-family: "Proxima Nova", Arial, sans-serif; } .my-monospace-text { font-family: Monaco, "Courier New", monospace; } .my-cursive-text { font-family: "Zapf Chancery", "Brush Script", cursive; } .my-fantasy-text { font-family: "Sketch Rockwell", Papyrus, fantasy; }
  • 52. To deal with physical units, you can’t rely on a screen.
  • 53. pt picas millimetres inches 12 1 4.22 1/6
  • 54. A4 (29.7cm × 21.0cm)
  • 56. To deal with screens, you must understand what are physical and reference pixels.
  • 57. A physical pixel is a physical point on the display.
  • 59. A reference pixel depends on the device, software and user settings.
  • 61. A 16px font on a smartphone screen won’t have as many millimetres as on a desktop screen.
  • 63. Change, test, use media queries, test again.
  • 65. “em” is a relative unit used since the movable types.
  • 66. It represents a type’s full body size.
  • 67. 1 em
  • 69. It’s always relative to its context’s font size.
  • 70. .wrapper { font-size: 16px; } .parent { font-size: 1.5em; } .child { font-size: .5em; }
  • 71. Root em unit (rem)
  • 72. “rem” is like “em” but always relative to the root (html).
  • 73. html { font-size: 16px; } .wrapper { font-size: 12px; } .parent { font-size: 1.5rem; } .child { font-size: 0.5rem; }
  • 74. For most of browsers and cases, the default root font size is 16px.
  • 75. html { font-size: 16px; } .wrapper { font-size: 12px; } .parent { font-size: 1.5rem; } .child { font-size: 0.5rem; }
  • 76. html { font-size: 100%; } .wrapper { font-size: 12px; } .parent { font-size: 1.5rem; } .child { font-size: 0.5rem; }
  • 78. The way you space your characters and text dictates how a person will read it.
  • 80. Line height is the distance between each line of types.
  • 81. The quick fox jumps over the dog 0 pixels Meta Serif 102px/102px
  • 82. The quick fox jumps over the dog Meta Serif 102px/144px 42 pixels
  • 83. A low line height makes the text too difficult to read.
  • 84. Helvetica 32px/32px “The Guide says that the best drink in existence is the Pan Galactic Gargle Blaster. It says that the effect of a Pan Galactic Gargle Blaster is like having your brains smashed out by a slice of lemon wrapped round a large gold brick.”
  • 85. A large line height makes the paragraph loose cohesion.
  • 86. Helvetica 32px/96px “The Guide says that the best drink in existence is the Pan Galactic Gargle Blaster. It says that the effect of a Pan Galactic Gargle Blaster is like having your brains smashed out by a slice of lemon wrapped round a large gold brick.”
  • 87. Find a comfortable proportion through trial-and-error.
  • 88. Helvetica 32px/48px “The Guide says that the best drink in existence is the Pan Galactic Gargle Blaster. It says that the effect of a Pan Galactic Gargle Blaster is like having your brains smashed out by a slice of lemon wrapped round a large gold brick.”
  • 89. Each typeface might require a different line height setting.
  • 90. Bembo 32px/48px “The Guide says that the best drink in existence is the Pan Galactic Gargle Blaster. It says that the effect of a Pan Galactic Gargle Blaster is like having your brains smashed out by a slice of lemon wrapped round a large gold brick.”
  • 91. Caslon 32px/48px “The Guide says that the best drink in existence is the Pan Galactic Gargle Blaster. It says that the effect of a Pan Galactic Gargle Blaster is like having your brains smashed out by a slice of lemon wrapped round a large gold brick.”
  • 93. Use a consistent vertical proportion by following a baseline.
  • 94. 9 reasons why cats will conquer the world. The number 5 will surprise you! “More importantly, a towel has immense psychological value. For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet-weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a man to be reckoned with.”
  • 95. 9 reasons why cats will conquer the world. The number 5 will surprise you! “More importantly, a towel has immense psychological value. For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet-weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a man to be reckoned with.”
  • 96. Choose a line height for a baseline, and make all vertical values derive from it.
  • 97. /* baseline = 24px */ body { font-size: 16px; line-height: 24px; /* baseline */ } .article-title { font-size: 32px; line-height: 48px; /* 2 × baseline */ } .article-excerpt { font-size: 18px; line-height: 24px; /* baseline */ } img { max-height: 312px; /* 13 × baseline */ } p { margin-bottom: 12px; /* 0.5 × baseline */ }
  • 98. If you pre-process your CSS, you ensure a consistent typography using variables.
  • 99. // _variables.scss $base-font-size: 16px; $baseline: 24px; // On your project: body { font-size: $base-font-size; line-height: ($baseline/$base-font-size); // 1.5 } .article-title { font-size: 2*$base-font-size; line-height: 2*$baseline; } .article-excerpt { font-size: 18px; line-height: $baseline; } img { max-height: 13*$baseline; } p { margin-bottom: 0.5*$baseline; }
  • 100. Be aware that each browser has its own baseline.
  • 102. Letter spacing is the whitespace between each single type.
  • 106. The use of letter-spacing is recommended for titles only.
  • 110. Kerning is a fine-tuning between specific pairs of characters.
  • 112. Task
  • 113. The browser default is automatically enabling/disabling it.
  • 117. You can manipulate the text’s indentation, which applies to its first line.
  • 118. More importantly, a towel has immense psychological value. For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet-weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a man to be reckoned with.
  • 119. More importantly, a towel has immense psychological value. For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet-weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a man to be reckoned with. .post p { text-indent: 2em; }
  • 120. For long texts, you can skip the indentation on the first paragraph.
  • 121. More importantly, a towel has immense psychological value. For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet-weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a man to be reckoned with. .post p { text-indent: 2em; } .post p:first-of-type { text-indent: 0; }
  • 122. More importantly, a towel has immense psychological value. For some reason, if a strag (strag: nonhitchhiker) discovers that a hitchhiker has his towel with him, he will automatically assume that he is also in possession of a toothbrush, washcloth, soap, tin of biscuits, flask, compass, map, ball of string, gnat spray, wet-weather gear, space suit etc., etc. Furthermore, the strag will then happily lend the hitchhiker any of these or a dozen other items that the hitchhiker might have accidentally "lost.". What the strag will think is that any man that can hitch the length and breadth of the Galaxy, rough it, slum it, struggle against terrible odds, win through and still know where his towel is, is clearly a man to be reckoned with. .post p + p { text-indent: 2em; }
  • 124. You can use CSS rules to properly style your content, like a well-authored book.
  • 126. Keep a clear hierarchy by using different font sizes, type faces and variants.
  • 129. A quote block can be highlighted with margins and pseudo-elements.
  • 131. blockquote { margin: 2em 6em; font-size: 24px; line-height: 1.5; font-style: italic; position: relative; } blockquote:before { content: "“"; position: absolute; left: -.75em; top: 0; font-size: 2.66em; line-height: 1; } blockquote .author { font-size: .75em; line-height: 1.77; }
  • 133. Explore CSS selectors to style specific parts of the text.
  • 136. OpenType fonts provide features to control and tweak the styles of your text.
  • 138. .my-class { font-variant-caps: small-caps; -moz-font-feature-settings: "smcp"; -ms-font-feature-settings: "smcp"; -webkit-font-feature-settings: "smcp"; font-feature-settings: "smcp"; } 33+ 4+ 10+
  • 143. The text should have an ideal line length.
  • 145. A line should have between 60 and 70 characters.
  • 149. The column size should respond to font size changes.
  • 151. The use of em-based column width might solve the problem.
  • 157. Font shapes are vectors that are rasterised to be displayed on pixels.
  • 158. Hinting is a manual work of tweaking sub-pixels to maintain a font’s identity and legibility on screen.
  • 161. Anti-aliasing is an algorithm used to smooth edges.
  • 162. Each OS and browsers have a different anti-aliasing and hinting setting.
  • 163. OS + Browser Hinting and AA Win XP — IE6–8 GDI Grayscale Win XP — IE6–8 ClearType GCI ClearType IE9+ DirectWrite Win XP Chrome GDI ClearType Win XP Firefox GDI ClearType Win 7+ Chrome 37+ DirectWrite Win 7+ Firefox Depends? OS X CoreText, ignores hinting * Based on a lot of Google searches, might not be accurate
  • 164. Test. On. Every. Browser.
  • 168. Choose a reliable source for your font.
  • 170. The font must have a proper unicode table, kerning, hinting etc.
  • 171. Also check for language support, webfont license, OpenType features.
  • 179. Each typeface has a story and a personality, choose one that match yours.
  • 180. The quick brown fox jumps over the lazy dog. Bembo — based in engravings from 1495, renaissance style, readable in small font sizes.
  • 181. The quick brown fox jumps over the lazy dog. Helvetica — Symbol of the Modern Design, is readable, international and neutral.
  • 182. The quick brown fox jumps over the lazy dog. Museo — The modern, geometric shapes and the rounded, slab serifs give a strong personality to this type.
  • 183. Serifs have a refined look, need less line height values, and help maintaining a cohesive text.
  • 185. Sans serifs have a modern look, and increased legibility on screens.
  • 187. Start simple, with a readable body typeface.
  • 188. Then format titles and subtitles using different weights and styles.
  • 189. Choose a second typeface for titles if needed. Avoid going further than that.
  • 192. Each font size is extra data that must be downloaded.
  • 194. Measure the impact of each added typeface.
  • 196. You’ll have to choose between speed and non-FOUC.
  • 197. Avoid loading custom typefaces on mobile devices.
  • 200. We are the craftspeople of the web.
  • 202. We should keep our roots in place.
  • 205. Further reading: The Elements of Typographic Style Robert Bringhurst EN: http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881791326 PT-BR: http://editora.cosacnaify.com.br/ObraSinopse/11584/Elementos-do-estilo-tipogr%C3%A1fico---vers%C3%A3o-30.aspx Thinking with Type Ellen Lupton EN: http://www.amazon.com/Thinking-Type-2nd-revised-expanded/dp/1568989695 PT-BR: http://editora.cosacnaify.com.br/ObraSinopse/1875/Pensar-com-tipos---2%C2%BA-edi%C3%A7%C3%A3o-%28Previs%C3%A3o-de-envio-a- partir-de-200415%29.aspx Type on Screen Ellen Lupton EN: http://www.amazon.com/Type-Screen-Critical-Designers-Developers/dp/161689170X On Web Typography Jason Santa Maria EN: http://abookapart.com/products/on-web-typography Type and Typography Baines & Haslam EN: http://www.amazon.co.uk/Type-Typography-Portfolio-Phil-Baines/dp/1856694372