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

suggestion for ofTrueTypeFont for new characters introduced by ISO 8859-15 #3002

Open
companje opened this issue May 30, 2014 · 3 comments
Open

Comments

@companje
Copy link

" In 1999, ISO needed to make the Euro currency symbol available. There were also a few other characters that were desired. So ISO created ISO-8859-15, which is identical to ISO-8859-1 except for 8 characters." [source: http://www.i18nqa.com/debug/table-iso8859-1-vs-iso8859-15.html]

ofTrueTypeFont shows the characters as they were in ISO-8859-1. A fix was added by @kylemcdonald at Jun 15, 2013 to support the euro sign but the other 7 characters that were introduced can be supported the same way by using the following code in ofTrueTypeFont::loadFont.

if (glyph == 0xA4) glyph = 0x20AC;   //  Currency Sign -> Euro Sign
if (glyph == 0xA6) glyph = 0x0160;   //  Broken Bar -> Latin Capital Letter S With Caron
if (glyph == 0xA8) glyph = 0x0161;   //  Diaeresis -> Latin Small Letter S With Caron
if (glyph == 0xB4) glyph = 0x017D;   //  Acute Accent -> Latin Capital Letter Z With Caron
if (glyph == 0xB8) glyph = 0x017E;   //  Cedilla -> Latin Small Letter Z With Caron
if (glyph == 0xBC) glyph = 0x0152;   //  Vulgar Fraction One Quarter -> Latin Capital Ligature OE
if (glyph == 0xBD) glyph = 0x0153;   //  Vulgar Fraction One Half -> Latin Small Ligature OE
if (glyph == 0xBE) glyph = 0x0178;   //  Vulgar Fraction Three Quarters -> Latin Capital Letter Y With Diaeresis
@bakercp
Copy link
Member

bakercp commented May 30, 2014

This seems like a reasonable solution for the time being. ofFont which is getting closer and closer now supports on-the-fly glyph caching so glyphs are cached and packed in a texture as they are needed, preventing the need to define the entire texture atlas all at once.

@danoli3
Copy link
Member

danoli3 commented Jun 18, 2014

@bakercp ofFont sounds amazing! 0.8.2? XD!

@bakercp
Copy link
Member

bakercp commented Jun 18, 2014

It will probably have to wait until 0.9.0 because it requires Poco 1.5+ and we're still on 1.4.3 in the core.

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

No branches or pull requests

4 participants