Home

Awesome

ThaiFontAdjuster

Unity3D font renderer lacks support for GPOS and GSUB. Because Thai font heavily depends on these features, rendered image looks ugly without them.

This library gives workaround to render Thai font almost correctly. Following image shows differences between results from original Unity3D and this library. Position of tone mark, upper vowel and lower vowel would be adjusted by surrounding characters.

Features

Where can I get it?

Visit Release page to get latest ThaiFontAdjuster unity-package.

How to use

Just before setting text of UnityEngine.UI.Text, text need to be translated by ThaiFontAdjuster.Adjust. Font of Text should be one of supported Thai fonts.

var s = "Thai ก์กิ์ป์ปิ์ฎุญุ";
Label.text = ThaiFontAdjuster.Adjust(s);

For other UI library using Unity3D dynamic font (like NGUI), you can do it by the same way.

Limitation

ThaiFontAdjuster only can handle special fonts.

Adjusting position is not same as true-type rendered one with GPOS and GSUB support.

Under the hood

If you want to know more detail about this libary, check UnderTheHood article.