README update after Unicode fonts appeared in gint
This commit is contained in:
parent
ad70bd5730
commit
7e9a9d7de0
18
README.md
18
README.md
|
@ -65,18 +65,22 @@ for extended font support.
|
|||
|
||||
## Using in gint
|
||||
|
||||
**Disclaimer**: this is being worked on, but not implemented in gint yet.
|
||||
|
||||
When converting the font with `fxconv`, pass the name of a folder containing
|
||||
block images instead of a simple image and set `charset` to `unicode`.
|
||||
To convert the font with `fxconv`, pass the name of a folder containing
|
||||
block images instead of a simple image and set `charset` to `unicode`. Note
|
||||
that in this setting, `area` is ignored and the same grid parameters are
|
||||
applied to all block images.
|
||||
|
||||
```sh
|
||||
% fxconv -f uf5x7/ name:uf5x7 charset:unicode grid.size:5x7
|
||||
```
|
||||
|
||||
When using the font, just call `dtext()` as usual and make sure the string is
|
||||
encoded as utf8. The `u8` prefix can be used if your source file is not
|
||||
encoded as utf8.
|
||||
When using the fxSDK, you can simply create a folder under `assets-fx` or
|
||||
`assets-cg` with the block files of your choice, for instance
|
||||
`assets-fx/uf5x7/U+0020.png`.
|
||||
|
||||
To use the font, configure it with `dfont()`, then call `dtext()` as usual.
|
||||
Make sure the string is encoded as UTF-8. The `u8` prefix can be used if your
|
||||
source file is not encoded as UTF-8.
|
||||
|
||||
```c
|
||||
dtext(5, 5, "Mézalors Δ=2 ⇒ ∀x∈S, x⊆Δ", BLACK, WHITE);
|
||||
|
|
Loading…
Reference in New Issue