webfont-ubuntu
v1.0.1
Published
The webfont-ubuntu package simplifies self-hosting the Ubuntu 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.
Maintainers
Readme
WebFont: Ubuntu
The webfont-ubuntu package simplifies self-hosting the Ubuntu 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 i -S webfont-ubuntuImport it into your main stylesheet:
@import url('/node_modules/webfont-ubuntu/dist/index.css');Register it in your application:
html {
font-family: "Ubuntu", 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: "Ubuntu", sans-serif;
font-size: 16px;
font-weight: 400;
font-style: normal;
font-display: swap;
...
}
}Built With
- CSS
