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

DrawTarget::draw_text panics if a glyph is not present in the provided font #150

Open
jdm opened this issue Jul 27, 2020 · 1 comment
Open

Comments

@jdm
Copy link
Contributor

jdm commented Jul 27, 2020

let id = font.glyph_for_char(c).unwrap();

Presumably we should be drawing a tofu glyph instead?

@jrmuizel
Copy link
Owner

The draw_text API is mostly a toy. The correct solution to use draw_glyphs with proper glyphs selected for the font. i.e. it's the user's responsibility to only draw glyphs that exist in the font.

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