Ligature Tools
Define character combinations and the result character enabling Key Collection inputs for Korean, Japanese and other ligature based character sets as well as common use extended characters.

Introduction

Define character combinations and the result character enabling Key Collection inputs for Korean, Japanese and other ligature based character sets as well as common use extended characters such as translating ( c ) to ©
The Ligature Tools provided in uGUI Extras helps you extend user input to account for common character combinations and to extend the use of Key Collection for language sets that depend on ligatures such as the Korean and Katakana character sets.
The way the system works is that an input string is tested for the input character combinations and when detected that character set is replaced with the output characters.

Ligature Library

Defines a set of ligatures

Ligature Helper

Connects to a game object with an InputField to parse ligatures on edit of the input field.
Works with both Text Mesh Pro Input Field and uGUI standard Input Field

Configuraiton

Configuring ligatures is made simpler with the Ligature Library's custom inspector. You will notice along the top of the inspector several buttons that will auto fill the editor with those settings. You can create custom settings using the Ligature Editor fields at the top of the inspector.

Usage

The typical use is to use the Ligature Library in conjunciton with the Ligature Helper which helps you direct the output of input fields through the Ligature Library to update the input field values as the user types.
An example of this can be seen in the Keyboard examples where you will observer that each input field has a Ligature Helper attached to it

Code Examples

Parse Text

Note when using Text Mesh Pro ... while Text Mesh Pro renders text in a much better way than Unity's "standard" uGUI text rendering it has some notable limitations, mainly that you must select a sub set of the character set to be supported or create larger Text Mesh Pro font assets.
The point is to be aware that Text Mesh Pro fonts rarely support the full unicode character set that traditionaly fonts can.
To parse a string in code you can use the library directly
var results = library.ParseAll(inputString);
The results returned is the result of converting all matching combinations to the target ligature characters.