Skip to content

Commit d9f5ae6

Browse files
committed
More docs
1 parent ca78f61 commit d9f5ae6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,25 @@ Position of tone mark, upper vowel and lower vowel would be adjusted by surround
1515
Visit [Release](https://github.com/SaladbowlCreative/Unity3D.ThaiFontAdjuster/releases)
1616
page to get latest ThaiFontAdjuster unity-package.
1717

18+
## How to use
19+
20+
Just before setting text of UnityEngine.UI.Text, text need to be translated by
21+
`ThaiFontAdjuster.Adjust`. Font of Text should be one of supported Thai fonts.
22+
23+
```csharp
24+
var s = "Thai ก์กิ์ป์ปิ์ฎุญุ";
25+
Label.text = ThaiFontAdjuster.Adjust(s);
26+
```
27+
28+
For other UI library using Unity3D dynamic font (like NGUI), you can do it by same way.
29+
1830
## Limitation
1931

2032
- ThaiFontAdjuster only can handle specific fonts.
2133
- Font should have extended glyphs from U+F700 to U+F71A providing various position of Thai characters.
2234
- [NECTEC National Fonts](http://www.nectec.or.th/pub/review-software/font/national-fonts.html) (Garuda, Loma, Kinnari, Norasi) already provide it.
2335
- Extended NotoSansThai-Regular for being supported is included in this package.
36+
- If you want to use another font, check it contains extended glyphs otherwise these glyphs have to be added.
2437
- Adjusting position is not same as true-type rendering with GPOS and GSUB support.
2538
- This library adjusts position of glyph at best with limited extended set of character.
2639
But without GPOS, ideal positioning is impossibe.

0 commit comments

Comments
 (0)