Loading .ttf font #1988
Answered
by
genusistimelord
zolotaya-ruda
asked this question in
Q&A
-
How can a load my own font? I'm trying: let MY_FONT= Font::External {
name: "noto-sans-regular",
bytes: include_bytes!(r"path/to/font.ttf"),
}; But as far as I understand from the documentation, the |
Beta Was this translation helpful? Give feedback.
Answered by
genusistimelord
Jul 31, 2023
Replies: 1 comment 7 replies
-
the way we load fonts is very different now which does make it much harder to work with, but here is a working example of loading a font. I just wished we could tell the system what we wanted the font to be called rather than what it loads as. |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
zolotaya-ruda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the way we load fonts is very different now which does make it much harder to work with, but here is a working example of loading a font.
https://github.com/iced-rs/iced_aw/blob/main/examples/color_picker/src/main.rs#L48
I just wished we could tell the system what we wanted the font to be called rather than what it loads as.