Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaturallyMonospaced fonts not rendering #47

Open
CristianOG opened this issue Feb 5, 2020 · 4 comments
Open

NaturallyMonospaced fonts not rendering #47

CristianOG opened this issue Feb 5, 2020 · 4 comments

Comments

@CristianOG
Copy link

When loading a font that is naturally monospaced it is not rendered.

Segoe UI.zip

Example using font attached:

image

Any Monospacing option makes no difference.

@opcon
Copy link
Owner

opcon commented Feb 11, 2020

Hi @CristianOG,

Just confirming a few things:

  1. Do non-monospaced fonts load okay?
  2. Are other monospaced fonts also rendered incorrectly?

Cheers

@CristianOG
Copy link
Author

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.

@opcon
Copy link
Owner

opcon commented Feb 20, 2020

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?

@CristianOG
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants