mirror of
https://github.com/cupcakearmy/glyphance.git
synced 2024-12-22 08:06:29 +00:00
readme
This commit is contained in:
parent
853fad31de
commit
fdf0c137f8
44
README.md
44
README.md
@ -1,12 +1,16 @@
|
|||||||
# Glyphance
|
# Glyphance
|
||||||
|
|
||||||
This is a CLI utility that help reduce load times and bytes by splitting typography files into smaller chunks for different alphabets automatically _without the tears_.
|
<kbd>/ɡlɪfhɑːns/</kdb>
|
||||||
|
|
||||||
|
This is a CLI utility that help reduce load times and bytes by splitting typography files into smaller chunks for different unicode ranges automatically _without the tears_.
|
||||||
|
|
||||||
## 🌈 Features
|
## 🌈 Features
|
||||||
|
|
||||||
- Configurable.
|
- Configurable.
|
||||||
- Config driven.
|
- Config driven.
|
||||||
- Docker image, no install required.
|
- Docker image, no local install required.
|
||||||
|
- Outputs `woff2`.
|
||||||
|
- Provides a generated CSS file to simply include.
|
||||||
|
|
||||||
## 🚀 Quickstart
|
## 🚀 Quickstart
|
||||||
|
|
||||||
@ -51,12 +55,14 @@ output:
|
|||||||
### Run
|
### Run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -v $(pwd)/example:/data glyphance
|
docker run -v $(pwd)/example:/data cupcakearmy/glyphance
|
||||||
```
|
```
|
||||||
|
|
||||||
### Enjoy
|
### Enjoy
|
||||||
|
|
||||||
Now you can use the generated font files and the `generated/fonts.css`.
|
Now you can use the generated font files and import the `generated/fonts.css` into your code.
|
||||||
|
|
||||||
|
> Remember you can modify the `prefix` to match the folder structure of your static files.
|
||||||
|
|
||||||
```
|
```
|
||||||
example/
|
example/
|
||||||
@ -99,3 +105,33 @@ output:
|
|||||||
css:
|
css:
|
||||||
font-weight: 400 # CSS to added to each @font-face. By defaults includes swap, normal weight and style
|
font-weight: 400 # CSS to added to each @font-face. By defaults includes swap, normal weight and style
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Provide custom unicode ranges
|
||||||
|
|
||||||
|
By default Glyphance uses the same ranges as Google Fonts. However you can customize and specify your own ranges. See the [list of possible values](https://en.wikipedia.org/wiki/List_of_Unicode_characters).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
fonts:
|
||||||
|
'Mulish':
|
||||||
|
- file: Mulish-VariableFont_wght.ttf
|
||||||
|
variable: true
|
||||||
|
css:
|
||||||
|
font-weight: 200 1000
|
||||||
|
- file: Mulish-Italic-VariableFont_wght.ttf
|
||||||
|
variable: true
|
||||||
|
css:
|
||||||
|
font-weight: 200 1000
|
||||||
|
font-style: italic
|
||||||
|
'FireCode':
|
||||||
|
- file: FiraCode-VariableFont_wght.ttf
|
||||||
|
variable: true
|
||||||
|
css:
|
||||||
|
font-weight: 300 700
|
||||||
|
|
||||||
|
output:
|
||||||
|
ranges:
|
||||||
|
abc: U+0061-0063
|
||||||
|
numbers: U+0030-0039
|
||||||
|
dot: U+002E
|
||||||
|
""
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user