The Modular Scale was created by Tim Brown. There are different ways to create a Modular Scale for typography. In our example, we're going to create a Modular Scale using two base numbers and one ratio. The multiplication of these numbers creates a scale that's harmonious and proportional between all the values.
The most well-known ratio is the golden ratio also known as the golden section, divine proportion, and so on. Its value is 1.618.
Now, to avoid unnecessary mathematics, the golden ratio is based on the Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21, and so on.
These numbers have the following pattern: the next number is the result of adding up the two numbers before it. For example:
0 + 1 = 1 + 1 = 2 + 1 = 3 + 2 = 5 + 3 = 8 + 5 = 13 + 8 = 21…
The idea here is to understand the intent of creating a set of numbers that are harmonious when used together. We are going to do the same to create a typographic scale to use in our projects with the Modular Scale web app and forget about manually calculating the relative font sizes for your project.
So let's check out the Modular Scale web app built by Tim Brown and Scott Kellum: http://www.modularscale.com/.
Once the web app opens, there are three steps we need to do in order to create our Modular Scale:
The recommended way to define this first number is to use the body text size, that is, the font size that is used in the paragraphs. But keep in mind that using the body text size as the first base number is not mandatory. We can use our typeface's x-height, or some other length within that typeface, that we think could be a good starting point.
Although we can choose any font size, let's start with the default one we all know all browsers use, 16px. So we type 16px in the first base field.
Click on the plus icon and add a second base field.
The second base field is what I call a magic number because this number is completely subjective and arbitrary, however, it's tightly related to the project we're working on.
When I say tightly related I mean something like using the width of the main container, for example, 960px, 980px, 1140px, and so on. Alternatively, it can also be the number of columns used in the grid, such as 12 or 16. It can also be the width of a column at the maximum width of the site, such as 60px, or even the gutter spacing, say 20px.
This magic number is anything we want it to be, but it's directly related to our project in one way or another. For this example, let's say we're going to target screens at a maximum width of 1280px, so our main container is going to have a maximum width of 1140px. So let's type 1140px in the second base field.
This is where the magic takes place. Choosing a ratio means that this ratio will be multiplied by the base numbers creating a scale of values that are proportionally related.
The ratios are based on musical scales, and in that list is the golden ratio (1.618) as well, if we decide to use it. From the Ratios dropdown, select 1:1.618 – golden section ratio.
That's it! We have now created our first Modular Scale.
The font sizes provided by this Modular Scale are totally harmonious because they are proportionate to each other based on relevant values that are directly related to our project:
Our typography now has a solid modular foundation, let's use it.