A good typography system has the power to string together every element of a product interface.
Additionally, it helps create a distinction between represented use-cases, and maintains the aesthetic value of a brand at all times. And that’s exactly what we were aiming to achieve with our typography system at Zomato.
While we were formulating typography guidelines for our very own design system, Sushi, we decided to put down a few tips and tricks that may help you scale your typography across multiple apps and devices. All this, without complicating the handoff between designers and developers.
The first step in this process is to define a type system that is extensible enough to cater to one’s dynamic needs and requirements.
In word processors, design programs, and even HTML/CSS, we’re used to having pre-set typography, including everything from font weight, line height to colour, and even spacing. However, to develop a customised typography system, the following properties need to be defined at the very beginning –
And then, the two most important steps need to be followed –
A typeface is a simple collection of letters.
Most brands that we know of, have their own default typefaces that need to be used when designing. Apple, for example, uses the typeface San Francisco. Google Material Design on the other hand refers to Roboto, and our own design system utilises the primary typeface, Okra.
Initially, we built our typography system based on Circular Std, which is very popular in the modern geometric typeface category. However, we wanted to ensure that we create a system that is scalable enough to support the unique requirements of our app.
After exploring a few options, we decided on Metropolis – an open-source geometric typeface – as the best font to support our use-case. We simply adopted Metropolis, modified it according to our requirements, and named it Okra.
For most people, the terms ‘font’ and ‘typeface’ are often used interchangeably. However, these are completely different. A typeface represents the parent category of a font. A single typeface can have multiple fonts as part of it, with slight differences in the look and feel of each.
There are many typefaces out there, but all fall under five basic categories –
Depending on the requirement of a particular system, typefaces are selected for their legibility, accessibility and readability. A design system may have only one typeface or can be paired with another typeface to make it more extensible.
A typographic scale is utilised to simply build a balanced font sizing across one’s design system.
As part of any design project, the visual hierarchy guides customers and helps them view areas that are of prime importance. The visual weight defines the importance of an element on a page, communicating to a viewer what they should focus on, and in what order.
Type sizes and weights are also defined with the following rules of thumb –
But sometimes, taking a case-by-case decision helps in fitting together elements more aesthetically.
In order to derive other font size values that are harmonious in nature, we simply need to experiment with values greater than the minimum base font size, which is 11px. During this process, we should gradually test with other font size values from the same set, such as 12px, 13px, and so on.
One good way to find the required pattern for the next font size is to audit the old UI screens and choose the type of scale accordingly.
Following this rule, we finalised on the font size for our Sushi design system – 11px, 12px, 13px, 15px, 17px, 19px, 21px, 24px, 27px.
All typography systems must include responsive type sizes across different device size breakpoints.
Line heights across all font sizes must be proportional to one another in order to build a good vertical pattern. To accomplish this, one way is to use the same base line height/base font size ratio for deriving all other line heights.
Standard line height is 150% of the font size or base font size/base line height.
Type names can help designers and developers understand when and where to use a certain text style.
Shopify’s Polaris is using this naming convention. Even though this works well as a naming convention for most systems, it is not the most scalable solution for every use-case. If we want to add a new size in between two sizes here, it’s almost impossible.
Do read our last post on the Sushi design system for more details around the different naming conventions considered during this process.
It’s a good practice to create separate type style libraries for all devices in order to make it easier to access and use.
More than anything, building a good typography system as part of a design system helps save a great amount of time across design and development processes, motivating the teams involved to focus on bigger issues, and opportunities for innovation.