https://github.com/dzucconi/chance-font
A real degree of freedom
https://github.com/dzucconi/chance-font
chance font random
Last synced: about 2 months ago
JSON representation
A real degree of freedom
- Host: GitHub
- URL: https://github.com/dzucconi/chance-font
- Owner: dzucconi
- Created: 2019-08-07T01:35:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-09-25T15:48:50.000Z (about 2 months ago)
- Last Synced: 2025-09-25T17:40:44.529Z (about 2 months ago)
- Topics: chance, font, random
- Language: JavaScript
- Homepage: https://dzucconi.github.io/chance-font/
- Size: 293 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chance-font
[](https://github.com/semantic-release/semantic-release) [](https://www.npmjs.com/package/chance-font) [](https://travis-ci.org/dzucconi/chance-font)
## What is this?
[A library](https://www.npmjs.com/package/chance-font) to return a random font stack from [a list provided by the W3C](https://www.w3.org/Style/Examples/007/fonts.en.html).
## Why should I use this?
You want a random font.
## Installation
```sh
yarn add chance-font
```
## Usage
```javascript
import chanceFont from "chance-font";
document.body.innerHTML = `
A real degree of freedom
`;
```
You can also specify the type of font you want:
```javascript
chanceFont('all'); // default
chanceFont('sans');
chanceFont('serif');
chanceFont('monospace');
chanceFont('cursive');
chanceFont('fantasy');
```