Import fonts in an Angular App — THE EASY / RIGHT WAY!

Aditya Tyagi
5 min readOct 6, 2019

One of the hot debates/discussions that I have with fellow developers is about the right and the most effective way of importing FONTS in an Angular application.

See, there are a number of blogs out there which outline the pros and cons and probably better explain what I am doing here in a much more extensive way. But I also understand that you probably don’t want to spend a shit load of time to read extensive articles on — FONTS.

So this is my attempt to provide you with my findings and probably the GO-TO steps for importing fonts.

There are two ways that we can import the fonts in our Angular application. Either we can use the CDN wherein the fonts are hosted on remote servers or we can deploy the fonts on our own servers and then import in the application.

Importing fonts using CDN

Some are in favor of importing the Google Fonts using CDN. The ease with which the CDN works is noteworthy. Not only it is lightning fast but also it decreases the bundle size of the overall application.

--

--

Aditya Tyagi
Aditya Tyagi

Written by Aditya Tyagi

Full Stack Engineer | JS, TS | NextJS, ReactJS | TailwindCSS | GraphQL

Responses (2)