Why Type Matters
Typography Fundamentals ๐
Course 1 ยท Chapter 1 ยท Text as a Designed Object
You read thousands of words a day: messages, signs, menus, packaging, web pages. Almost none of it was left to chance. Somebody chose the shape of the letters, how big they are, how far apart the lines sit and how wide the column is, and those choices decide whether you read the thing happily, struggle through it, or skip it. That craft is called typography. The word comes from Greek roots meaning "impression" and "writing" (check), a leftover from the days when letters were pressed into paper from metal blocks.
This course is for the curious beginner. You do not need design experience. Because you are also a web-development student, we will keep tying ideas back to CSS, but the ideas belong to paper and signs as much as to screens. This first chapter does three things: it shows that text is designed, it teaches the vocabulary for talking about a single letter, and it peeks inside a letter to see what a font really contains.
Text Is Designed, Even When You Do Not Notice
Here is the same sentence set three ways. Nothing about the words changes. Everything about how it feels does.
Closed for stocktaking. We will open again on Monday.
Serif letters, comfortable size, calm.
Closed for stocktaking. We will open again on Monday.
Heavy, capitals, tight lines: it shouts.
Closed for stocktaking. We will open again on Monday.
Every letter the same width: it sounds technical.
The point is that type carries a voice before anyone has read a word. A reader decides in an instant whether a page looks trustworthy, friendly, urgent or boring, and typography is a large part of that. It is also a practical craft: the right choices simply make text easier on the eyes.
Reading Versus Looking
There are two jobs text can do, and good designers know which one they are asking of it.
| Looking (display) | Reading (text) | |
|---|---|---|
| Examples | A shop sign, a poster headline, a logo, a book title on the cover | A novel's pages, a news article, a manual, a long web page |
| What the reader does | Takes it in at a glance, from a distance, in a second or two | Settles in and moves along line after line, for minutes or hours |
| What it needs | Personality, impact, a shape you remember | Evenness, comfort, letters that disappear so the meaning shows through |
| Typical choices | Large sizes, heavy or unusual shapes, tight spacing | Moderate sizes, regular weights, generous spacing, a sensible line length |
| CSS you would reach for | Big font-size, font-weight: 800, a display font | line-height: 1.5, a limited max-width, a plain body font |
Two words are worth separating now, because they get mixed up. Legibility is whether individual letters can be told apart (is that an l, a capital I or a 1?). Readability is how comfortable a whole stretch of text is to read: the size, spacing, line length and contrast working together. A letter-perfect font can still give unreadable text if the lines are far too long. Later chapters, especially Typography Fundamentals 3 and Typography Fundamentals 7, take both seriously.
The Vocabulary of a Letter
To talk about type you need names for its parts, the same way you need names for the parts of a bicycle before you can say what is wrong with it. Almost every term comes from a set of invisible horizontal lines that letters are built against.
A schematic: the letters are drawn as simple strokes so that the lines line up exactly, not copied from any real font.
| Term | What it is | Where you meet it |
|---|---|---|
| Baseline | The invisible line most letters sit on, like writing on ruled paper | Mixing sizes on a line: vertical-align: baseline and aligning text across columns |
| x-height | The height of a plain lowercase letter such as x, measured from the baseline | The reason two fonts at the same font-size look different sizes; CSS even has an ex unit based on it |
| Cap height | The height of a capital letter such as H, measured from the baseline | How tall capitals look next to lowercase; CSS has a cap unit (browser support: check) |
| Ascender | The part of a letter that rises above the x-height: the stem of d, b, h, l | Often a little taller than the capitals, though not in every font |
| Descender | The part that drops below the baseline: p, g, y, q | The reason lines of text need some room between them: descenders must not hit the ascenders below |
| Counter | The enclosed or partly enclosed empty space inside a letter: the hole in o, d, p | Open, generous counters keep small text legible; tiny closed ones fill in |
| Bowl | The curved stroke that makes a counter | The round part of p, d, b |
| Stem | The main upright stroke of a letter | The vertical of H, l, p |
| Crossbar | A horizontal stroke linking two others | The bar of H, A, e, t |
| Serif | A small finishing stroke at the end of a main stroke | The reason for the words "serif" and "sans-serif" (sans is French for "without") |
| Stroke | Any line that makes up a letter; its thickness is the stroke weight | font-weight is a request for thicker or thinner strokes |
A quick test of whether the vocabulary has stuck: find the letters in this sentence that have a descender, and the letters that have an ascender. (Descenders: the g, y, p and q kind. Ascenders: b, d, f, h, k, l. The dot of i and j counts for neither.) You will never read a page the same way again.
font-size does not directly tell you how big the letters look.
Measure It: Same Size, Different Letters
A font file stores these measurements. The script below opens four fonts that ship with Windows and prints their x-height and cap height, as a fraction of the em (the font's own unit of size: when you ask for font-size: 16px you are really asking for an em of 16px). It uses the free fontTools package (py -m pip install fonttools).
Read the x/em column. At the same font size, Arial's lowercase letters are about 16% taller than Times New Roman's (0.519 against 0.447). Same "16px", noticeably different letters. This is the single most common reason a font swap makes a page look suddenly bigger or smaller, and why a design that uses two fonts side by side often has to nudge one of their sizes. (Exercise 3 does the sum for you.)
You can see the effect live. These two lines are both set at exactly the same size:
Handsome sphinx of black quartz
Handsome sphinx of black quartz
On a machine without those fonts the browser substitutes others and the difference may shrink or vanish: that is a lesson in itself (Typography Fundamentals 6 returns to fallbacks).
A First Look Inside a Glyph
A single letter as drawn in a font is called a glyph. A character is the idea ("the lowercase letter a"); a glyph is one particular picture of it, and one font can hold several glyphs for the same character (an italic and a regular a look different). A font is a collection of glyphs plus the measurements and rules that go with them; a typeface is the design as a whole, which can come in many fonts (regular, bold, italic). You will see the typeface/font distinction used loosely everywhere, including on this site.
Inside a modern font, a glyph is not a picture of pixels. It is an outline: a closed loop (or several) made of points joined by straight lines and smooth curves, drawn inside an invisible box called the em square. Because it is a set of instructions rather than a bitmap, the same glyph can be scaled to a tiny footnote or a billboard without going blocky. The em square is a grid of "font units" (2048 per em in the fonts above; fonts in the other common style use 1000 (check)), so the x-height of 1062 for Arial really means "1062 units up from the baseline, out of 2048".
Each loop is a contour. A letter like l needs one; a letter like o needs two: an outer loop and an inner loop for the counter. Curves are drawn with control points, which sit off the outline and pull it into a curve, as a magnet would. Let us count them for four letters:
Read it as a story. The l is a plain rectangle: one contour, four corner points, no curves. The H is one contour too (the outline wraps around the whole letter shape) with twelve corners and still no curves. The o has two contours, the outer edge and the counter, and most of its 26 points (17) are off-curve control points: curves cost points. Arial's g also has two contours (its outer shape and the counter of its bowl) and is the most complicated of the four with 43 points. Counting points is a crude measure of drawing effort, but it shows that "simple" letters are not all equally simple.
Print and Screen: The Same Ideas, Different Names
| Idea | In print | In CSS |
|---|---|---|
| Size of the em | "Point size" (a point is 1/72 of an inch, in the common computer definition (check)) | font-size: px, rem, em, pt |
| Strokes thicker or thinner | Choosing a bold or light font | font-weight |
| Space between lines | Leading | line-height |
| Which design to use | Choosing a typeface | font-family |
| How wide a column is | Measure (line length) | max-width on the text container |
The CSS side of a few of these, in miniature:
Notice the two jobs from earlier at work: the body asks for comfort (a moderate size, generous line-height, a limited width) while the heading asks for impact (large, heavy, tight). Those numbers are starting points, not rules. Typography Fundamentals 3 explains how to choose them properly.
Hands-On Exercises
Three exercises: a code task, a look-around-you design task, and a CSS task that connects them. Each has a solution file that opens in a new tab.
Extend font_metrics.py to cover seven fonts (add Verdana, Calibri and Courier New) and rank all of them by x-height as a fraction of the em, largest first. Before you run it, predict which font will have the largest x-height and which the smallest.
Pick one printed object near you (a packet, a bus timetable, a book cover). List each separate piece of text on it, say for each whether it is meant to be read or looked at, and name what the designer did to make that so. Use at least three terms from the vocabulary table.
๐ View solutionMake a small HTML page that shows the same sentence in Georgia and Arial at 18px. Using the x-height numbers from this chapter, work out what size Georgia needs to be to match Arial's lowercase height, and add a third line at that size. Then look up font-size-adjust as a way to let the browser do it.
Chapter 1 Quick Reference
- Type has a voice before it is read: the same words set three ways say three different things
- Looking versus reading: display text is built for impact at a glance; body text for comfort over time
- Legibility = letters can be told apart; readability = a stretch of text is comfortable to read
- The lines: baseline, x-height, cap height, ascender line, descender line
- The parts: stem, bowl, counter, crossbar, serif, stroke, ascender, descender
- x-height decides how big text looks: at the same
font-sizeArial's lowercase is about 16% taller than Times New Roman's (0.519 against 0.447 of the em) - A glyph is an outline of contours (loops) in an em square; counters are inner contours, and curves use off-curve control points