Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dzucconi/chance-font
A real degree of freedom
https://github.com/dzucconi/chance-font
chance font random
Last synced: 10 days 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T01:48:50.000Z (7 months ago)
- Last Synced: 2024-04-23T04:05:12.047Z (7 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
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![npm](https://img.shields.io/npm/v/chance-font)](https://www.npmjs.com/package/chance-font) [![Build Status](https://travis-ci.org/dzucconi/chance-font.svg?branch=master)](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');
```