Skip to content

Font library for local install of roboto variants used by Angular Material

License

Notifications You must be signed in to change notification settings

bjowes/roboto-fontface-material

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roboto-fontface-material

Font library for local install of Roboto variants used by Angular Material.

version downloads MIT License

Motivation

When using the Roboto fonts in applications I have been developing, I found existing libraries for local installation of the fonts didn't fit my purposes:

  • I wanted to use the fonts in both library modules and applications containing such modules. When combining these the font paths were messed up.
  • I wanted a streamlined package with only the fonts required for Angular Material to reduce the npm install burden

Hence I made this library. Just install it and reference it from angular.json and you are good to go!

Details

Only the woff and woff2 versions are included since they are sufficient to support every modern browser. Also, only the fontweights and styling used by Material is included. This takes us down to three fonts (six font files).

Installation

npm install roboto-fontface-material

Usage

In your main angular project, add this line to the scripts section in angular.json:

"node_modules/roboto-fontface-material/fonts/roboto-fontface-material.css"

This ensures that the font files are included in your assets when building your application, and Material will automatically use your local versions.

License notes

The MIT license applies to this compilation of the Roboto fonts for Angular Material.

The fonts themselves are created by Christian Robertson and are released under the Apache license.

About

Font library for local install of roboto variants used by Angular Material

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages