December 5, 2021

Typekit switches to Asynchronous Font Embedding

According to the Adobe Typekit blog, their company is putting together a series of performance improvements and one of them is a noteworthy change to their embed code.

The original problem with their embed code was that it blocked out rendering of a page while fonts were being loaded. This in turn caused a negative impact on site performance since it also meant the browser had to pause until all fonts loaded before completing the page rendering.

Typekit is changing this process with async loading.

As of early August, all newly-made kits will include the asynchronous loading code. This means a major improvement in website performance by enabling web browsers to render content in a fallback font while the Typekit fonts finish loading.

This process called “Flash of Unstyled Text” can now be controlled by using “font events” provided by Typekit.

With font events a designer can choose to either hide a piece of content or show the content in fallback text while the established web font(s) are loading.

The new embed code isn’t even much different, either.

Typekit async embed font code

Users who take a look at it might notice that the async option that enables asynchronous font loading is set to “true” by default. On the other hand, if a user prefers the old blocking behavior they can simply remove the async option or set it to “false”.

Typekit has provided further configuration options for this new embed code in their help section.

This change will have no effect on existing kits and those who are still going with default blocking behavior can do so unimpeded.

However anyone who’s interested in the new async embed code can grab a copy from their kit editor, or simply modify their existing code to include async loading with fallback text.

Stephan Jukic is a writer who focuses on writing about web design and educational topics for Ascend Training. When not busy writing , he spends his days enjoying life’s adventures either in Canada or Mexico, where he spends part of the year. Connect with Stephan on LinkedIn and Google+.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *