Spacing of unicode characters in GUI fonts (DEF-2422)

Hello,

I have a bit of an issue rendering unicode characters (specifically hiragana and kanji) in my game. There doesn’t seem to be any spacing between the characters. Any ideas on how to solve this?

Thanks :slight_smile:

Also, is there any way to force antialiasing for UI elements? (mainly pies which are challenging to replace with a bitmap)

1 Like

Oddly enough, another font (which is in TTF format) works. Makes me wonder, is this a general issue with handling OTF in Defold, with certain unicode typefaces or with one particular font?

Any font wizards reading this? :smiley:

1 Like

I would suspect it something funny with the font you are using, it seems that the Defold build process does not get correct width/x-advance of each glyph. (To get this information we rely on the built in capabilities in the Eclipse framework, if I recall correctly.) :slight_smile:

If you try another OTF font I believe it will (should) work, which would indicate there is a problem with your initial font. What font is it? Is it available somewhere for free?

1 Like

The font in question is called Yasashi Antique.


Direct link: http://flop.sakura.ne.jp/font/fontna-op/YasashisaAntiqueFont.zip

2 Likes

Thanks, just verified it here and it might be a bug with how we handle glyph advance/left bearing that needs some investigating. I have added an issue for it: DEF-2422

In the meantime could you use the TTF supplied in the same Zip since it seems to behave correctly?

2 Likes

No problem, will do! :slight_smile:

2 Likes