8 Text and typography math
This chapter covers
- Understanding the mathematical relationships between font size, line height, and spacing for optimal readability
- Using CSS math functions for fluid, responsive typography
- Implementing modular scales and mathematical ratios in type systems
Typography on the web is fundamentally a mathematical craft. While designers often make typographic decisions based on visual intuition, the most readable and aesthetically pleasing text arrangements follow specific mathematical relationships that have been refined over decades of digital typography research and, really, over centuries of print design.
When you land on a web page that you find aesthetically pleasing, you might be responding to the color scheme or to the use of images, but I’m willing to bet that what you’re really responding to is the typography of the page. If that seems surprising, then it means the person who did the page typography has done a great job because it’s a general design rule that the better the typography, the less noticeable it is.