Replies: 2 comments 4 replies
-
After looking at the docs, I would try the following: Create a Typeface from Family, Weight, Style HTH |
Beta Was this translation helpful? Give feedback.
-
We currently only support creating a geometry from FormattedText. Loading typeface from file is currently only possible via some custom code. Direct support can be added. |
Beta Was this translation helpful? Give feedback.
-
Hello all,
I am trying the classic, to port a WPF application to Avalonia. In this project, there is a need to draw and position individual font glyphs (by glyph index in the font file, rather than unicode codepoint), and I was doing this via the WPF
GlyphTypeface
class, using something like the following:The fonts have to be loaded in dynamically, and cannot be made part of the application. And it needs to support font collection files (
.ttc
,.otc
).I found a reference to a GlyphTypeface class in Avalonia using Google, here, but it doesn't seem to be in my installed version of Avalonia (11.0.10) - but there is an
IGlyphTypeface
?Similar questions have been asked before, but I don't particularly understand the answers (or there was no satisfying answer), or what level of implementation has come after. There are some code snippets here, but I'm unsure where they're supposed to be inserted? (Into my own code, or should I be downloading and modifying Avalonia?)
Does anyone have any idea if this can be done in Avalonia currently? And if so, would you be able to share a code snippet or two?
Many thanks in advance for any help you can provide.
Beta Was this translation helpful? Give feedback.
All reactions