css-font-roboto
v1.0.0
Published
Roboto font base64 encoded and embedded in css
Downloads
915
Readme
Roboto Font v15
This package contains some of the Roboto font styles that are base64 encoded and embedded in a single css file.
Why
This is useful for prototyping because you start using the font quickly by importing single css file to your project/playground and it does not require internet connection to use it once the package has been installed. Depending on your setup adn use case this could be used in production as well to reduce network requests or if you want to embedd your fonts into a cordova app.
Usage
You can use it in a webpack project by importing it import '@ox2/css-font-roboto'
in your top level js file like index.js
or if your using React Storybook in your .storybook/config.js
file.
Bundled font styles:
- Light 300
- Normal 400
- Normal 400 Italic
- Medium 500
- Bold 700
- Bold 700 Italic
Bundled font language subsets:
- Latin
Update Instructions:
- Download remote css file with font links, output:
downloads/index.css
:
npm run download
- Fetch and convert downloaded font data into base64-encoded data URI strings, output:
src/index.css
:
npm run convert
- Build the package, output
build/
npm run build
Font License
Apache License, version 2.0
More info: https://www.google.com/fonts/specimen/Roboto
Repository: https://github.com/google/roboto
Package License
MIT