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

Font sizes passed to Zui constructor prevent unicode glyphs rendering for text at those sizes #27

Closed
thoughton opened this Issue Oct 15, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@thoughton

thoughton commented Oct 15, 2016

As originally discussed here:
http://forum.kode.tech/topic/122/how-to-draw-unicode-characters

I've encountered an issue whereby it seems that the font sizes passed into the Zui constructor somehow prevent those particular font sizes from rendering unicode glyphs via g2.drawString calls.

I've put together a small example program here:
https://github.com/thoughton/kha-InputThing

In particular, see this code on line 20 of Project.hx in that example:

// Issue:
//  The font sizes passed to Zui here cause the unicode glyphs to fail to render when g.drawString is called for text of either of these sizes.
//  Changing these sizes changes the size of unicode glyphs that fail to draw.
//  Commenting out or removing this Zui instatiation will re-enable unicode glyph rendering at all font sizes. 
m_zui = new Zui(Assets.fonts.NDS12, 24, 12, 0, 1.0, 1.0);

Here's an image of the output using the above snippet of code:

@luboslenco

This comment has been minimized.

Show comment
Hide comment
@luboslenco

luboslenco Jul 9, 2017

Member

Fixed in b310dab. The issue was zui touching the font file to retrieve its height before the glyphs were added.

Member

luboslenco commented Jul 9, 2017

Fixed in b310dab. The issue was zui touching the font file to retrieve its height before the glyphs were added.

@luboslenco luboslenco closed this Jul 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment