Advertisement

BMFont - Is Extracting glyph from the substitution table possible?

Started by May 09, 2017 02:44 PM
0 comments, last by WitchLord 7 years, 6 months ago

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.

http://9tawan.net/en/

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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement