Jump to content
  • Advertisement
Sign in to follow this  
mr_tawan

BMFont - Is Extracting glyph from the substitution table possible?

This topic is 501 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm currently working on a game that needs to display in Thai. Certain words in the language requires glyph substitution (eg. กตัญญู -- notice that there are 2 yor ying(ญ) that looks a little bit different). The TrueType font that I'm currently using only provides the substitution in the substitution table (GSUB), which I couldn't find a way to get it included in the bitmap font created by BMFont.

I'd like asked, is it currently possible to extract that variant of that character from that font? If that's not possible then is there any workaround other than creating the glyph manually ? 

Thank you.

N.

PS. I know that some Thai fonts provide the alternative version of some character in the PUA area. Unfortunately the font that I'm using does not. I am thinking about moving to the other font anyway.

Share this post


Link to post
Share on other sites
Advertisement

I'll need to study this. Currently BMFont just provides a basic unicode code point to glyph mapping. If the substitution glyph is not represented by a single Unicode code point then BMFont currently doesn't see it.

I'm not sure how exactly the substitution glyph for U+E0D followed by U+E39 is stored in the TrueType. It might be a single glyph that is not directly mapped to a single unicode code point, or it may be a combination of individual glyphs that the script engine then puts together when rendering the text.

I found this article by Microsoft that explains a little bit on how it works:

https://www.microsoft.com/typography/OpenTypeDev/thai/intro.htm

I'll see if I can figure out how to expose this in BMFont. Perhaps I'll need to provide a way to expose the GSUB table so these can be exported too.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!