-
I am trying to add a custom font. buffer.set_text(
font_system,
"my text",
Attrs::new()
.family(
FontFamily::Name(name) => Family::Name("MY_CUSTOM_FONT_NAME"),
... it will load the "MY_CUSTOM_FONT_NAME" and use it when rendering "my text". Appreciate any responses. |
Beta Was this translation helpful? Give feedback.
Answered by
camcd93
Dec 6, 2023
Replies: 1 comment
-
Found the answer. It is more to do with cosmictext than glyphon.
So if I have a directory like: fonts/MyCustomFont
let font_dict = self.font_system.db_mut();
font_dict.load_fonts_dir("fonts/MyCustomFont"); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
camcd93
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the answer. It is more to do with cosmictext than glyphon.
So if I have a directory like:
fonts/MyCustomFont
-- MyCustomFontItalic.ttf
-- MyCustomFontRegular.ttf
-- etc...