1
0
Fork 0
mirror of https://github.com/Findus23/RainbowRoad.git synced 2024-09-19 16:03:52 +02:00

add Gilbert webfont

This commit is contained in:
Lukas Winkler 2022-09-21 16:37:38 +01:00
parent 2614885dad
commit a67ea54c9b
Signed by: lukas
GPG key ID: 54DE4D798D244853
16 changed files with 58 additions and 0 deletions

Binary file not shown.

Binary file not shown.

BIN
src/font/Gilbert-Color.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

50
src/font/README.md Normal file
View file

@ -0,0 +1,50 @@
# Gilbert Webfont
This work is licensed under
a [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/) License
This is the `Gilbert` font from https://www.typewithpride.com/ converted to a COLRv0 webfont that should work in all
major browsers.
see here for more details: https://github.com/googlefonts/nanoemoji/issues/435
## Files
Always use the .woff2 variants of files as they are compressed and much smaller
| Filename | Size | Size (woff2) | Format | Works in | Description |
|-----------------------------------|-------|--------------|---------------|------------------------------------------------|--------------------------------------------------------------------------------|
| `Gilbert-Color Bold Preview5.otf` | 626kb | 96kb | OT-SVG | Firefox only | The original Font from [www.typewithpride.com](https://www.typewithpride.com/) |
| `Gilbert-Color.ttf` | 542kb | 76kb | OT-SVG | Firefox only | The same as above, but converted to TTF (needed for next steps) |
| `Gilbert-Color_SVG+COLRv1.ttf` | 597kb | 99kb | OT-SVG+COLRv1 | [Chrome](https://caniuse.com/colr-v1) | |
| `Gilbert-Color_COLRv1.ttf` | 119kb | 39kb | COLRv1 | [Chrome](https://caniuse.com/colr-v1) | |
| `Gilbert-Color_SVG+COLRv0.ttf` | 587kb | 94kb | OT-SVG+COLRv0 | [all major browsers](https://caniuse.com/colr) | |
| `Gilbert-Color_COLRv0.ttf` | 109kb | 33kb | COLRv0 | [all major browsers](https://caniuse.com/colr) | |
### Conversions
#### OTF -> TTF
[otf2ttf.py](https://github.com/fonttools/fonttools/blob/main/Snippets/otf2ttf.py)
```bash
python otf2ttf.py `Gilbert-Color Bold Preview5.otf` -o `Gilbert-Color.ttf`
```
#### OT-SVG -> COLRv1
using [nanoemoji](https://github.com/googlefonts/nanoemoji)
```bash
maximum_color Gilbert-Color.ttf --output_file Gilbert-Color_SVG+COLRv1.ttf
ttx -x SVG Gilbert-Color_SVG+COLRv1.ttf
ttx Gilbert-Color_SVG+COLRv1.ttx
mv Gilbert-Color_SVG+COLRv1#1.ttf Gilbert-Color_COLRv1.ttf
```
#### OT-SVG -> COLRv0
same as COLRv1, but with [otsvg-to-colrv0](https://github.com/googlefonts/nanoemoji/compare/otsvg-to-colrv0?expand=1)
branch

5
src/font/webfont.css Normal file
View file

@ -0,0 +1,5 @@
@font-face {
font-family: Gilbert-Color;
font-weight: bold;
src: url("./Gilbert-Color_COLRv0.woff2");
}

View file

@ -1,3 +1,4 @@
import "./font/webfont.css"
import "./style.scss" import "./style.scss"
import "./map" import "./map"

View file

@ -30,6 +30,8 @@ html, body {
.name { .name {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
font-family: Gilbert-Color, sans-serif;
font-size: 170%;
} }
.star { .star {