1.0.15 • Published 12 months ago
font-downloader v1.0.15
font-downloader - This is a CLI tool that downloads Google Fonts and generates CSS stylesheets for using them.
Installation
You can install this package using npm:
npm install -g font-downloader Or using pnpm:
pnpm add -g font-downloaderOr using yarn:
yarn add -g font-downloaderOr using bun:
bun add -g font-downloaderUsage
Downloading Fonts
You can download fonts using the following command:
font-downloader <fontName>For example, to download the Roboto font and generate its CSS stylesheet:
font-downloader RobotoThis command will download the Roboto font files and generate its CSS stylesheet.
Structure
Downloaded font files are saved in the following structure:
/src/assets/fonts/<font-name>/
- <font-name>-Regular.ttf
- <font-name>-Bold.ttf
- <font-name>.cssThe generated CSS file contains @font-face rules for including the font in your project.
Using CSS
@import url('./src/assets/fonts/roboto/roboto.css');
body {
font-family: 'Roboto', sans-serif;
}Contributing
To contribute to this project, please submit a pull request or open an issue.
License
MIT