Open CristianOG opened 4 years ago
Hi @CristianOG,
Just confirming a few things:
1) Do non-monospaced fonts load okay? 2) Are other monospaced fonts also rendered incorrectly?
Cheers
After some digging I found it's not about monospacing. This is a custom font which comes with no glyphs. So when LoadGlyph is executed GetCharIndex is always 0.
Is there a way to detect this? For example I've got a project where I need to load the embedded fonts from a file, but in this case it should fallback to a system installed font.
It would be good if DrawString reported if the text has been fully rendered, partially rendered or not rendered at all.
Thanks for looking in to it a bit further. I've been pretty busy lately, but I should have some time over the weekend to look in to this.
I agree that some sort of reporting on whether the string rendered correctly or not would be good - I'll have a look at it.
Alternatively, would a simple check for an 'empty/glyph-less' font file be sufficient?
Yes, that kind of check would work. Would it be possible to load it's config into another font? Let's say I get a custom Segoe UI font without glyphs, but with some metadata in it used in the rendering, and I want to get the system Segoe UI font and render it with the metada from the custom font. Is that possible? Does it make sense?
Many thanks for the help.
When loading a font that is naturally monospaced it is not rendered.
Segoe UI.zip
Example using font attached:
Any Monospacing option makes no difference.