Skip to content

Commit

Permalink
fix: custom font docs adding language type to charset example
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender authored Apr 3, 2024
1 parent 0e301d8 commit ff6732b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/tutorials/custom-fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ fontforge -lang=ff -c 'Open($1); SelectAll(); RemoveOverlap(); Generate($2)' rob
#### Generating the msdf font
Next, we use `msdf-bmfont` to convert the `.ttf` file to a texture and a `.json` file. For that we need the *FontForge* generated font and a charset file containing all the characters we want to include in our msdf-font.

```
charset.txt
!\"#$%&'()*+,-./0123456789:;<=>?@ÄÖÜABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`äöüabcdefghijklmnopqrstuvwxyz{|}~ߧ
```

```bash
npx msdf-bmfont -f json fixed-roboto.ttf -i charset.txt -m 256,512 -o public/roboto -s 48
```

example charset.txt:
```txt
!\"#$%&'()*+,-./0123456789:;<=>?@ÄÖÜABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`äöüabcdefghijklmnopqrstuvwxyz{|}~ߧ
```

> **IMPORTANT:** Only a single texture file is supported by uikit, so make sure the generated texture is a single file. Otherwise adjust the texture by increasing the resolution or by decreasing the font size.
#### Implementing the generated font
Expand Down

0 comments on commit ff6732b

Please sign in to comment.