• Advertisement
Sign in to follow this  

BMFont - Is Extracting glyph from the substitution table possible?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement