Skip to content

The webfont-roboto package simplifies self-hosting the Roboto Font for your web applications. This means you can use the font without relying on external services. It works with both vanilla CSS and popular frameworks like Tailwind.

License

Notifications You must be signed in to change notification settings

jesusgraterol/webfont-roboto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebFont: Roboto

The webfont-roboto package simplifies self-hosting the Roboto Font for your web applications. This means you can use the font without relying on external services. It works with both vanilla CSS and popular frameworks like Tailwind.


Getting Started

Install the package:

npm install -S webfont-roboto

Import it into your main stylesheet:

@import url('/node_modules/webfont-roboto/dist/index.css');

Register it in your application:

html {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ...
}

Alternatively, if you're using Tailwind CSS:

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    ...
  }
}

Built With

  • CSS

License

MIT


Acknowledgments


Deployment

Install dependencies:

npm install

Build the package:

npm start

Publish to npm:

npm publish

About

The webfont-roboto package simplifies self-hosting the Roboto Font for your web applications. This means you can use the font without relying on external services. It works with both vanilla CSS and popular frameworks like Tailwind.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages