TextShaper implementation using Monotype's WTShaper library.
More...
#include <kanzi/plugins/itype/itype_text_shaper.hpp>
|
struct | FontData |
| Runtime data for text layouting to be passed to WTShaper. More...
|
|
TextShaper implementation using Monotype's WTShaper library.
kanzi::ItypeTextShaper::ItypeTextShaper |
( |
const FontRuntime & |
font | ) |
|
|
explicit |
Constructor.
- Parameters
-
font | Font object used for shaping. |
Constructor that constructs the shaper object to use with the Thai dictionary.
- Parameters
-
font | Font object to use for shaping. |
thaiDictionary | Thai dictionary object. |
- Since
- Kanzi 3.9.4
virtual kanzi::ItypeTextShaper::~ItypeTextShaper |
( |
| ) |
|
|
virtual |
Use this function to:
- Create tags to indicate which parts of the text must be written left-to-right and which right-to-left.
- Mirror specific character for the text written right-to-left.
- Shape text.
- Parameters
-
unicodeText | Text to shape and mirror. |
- Returns
- Layouting information for each character.
Reimplemented from kanzi::TextShaper.
virtual void kanzi::ItypeTextShaper::appendTerminator |
( |
unsigned int |
newSize, |
|
|
const TextLayouter::IntermediateLayout * |
terminator, |
|
|
unsigned int |
terminatorPosition |
|
) |
| |
|
overridevirtual |
Updates the internal shaper structures to accommodate a terminator string, which replaces a part of the original text.
- Parameters
-
newSize | Size of the text including the terminator. |
terminator | Pointer to the intermediate layout containing the terminator. |
terminatorPosition | The position in the text buffer at which the terminator would be appended. This is needed for RTL text. For LTR text, the terminator position is always at the right-end of the text. |
Reimplemented from kanzi::TextShaper.
Updates the internal shaper structures to accommodate another string, which Kanzi inserts in the original text.
For example, a hyphen.
- Parameters
-
location | Position where the string is inserted. |
text | Pointer to the intermediate layout containing the text. |
Reimplemented from kanzi::TextShaper.
void kanzi::ItypeTextShaper::removeText |
( |
unsigned int |
location, |
|
|
unsigned int |
length |
|
) |
| |
|
overridevirtual |
Reorders the text line for text written right-to-left.
- Parameters
-
layout | Pointer to the intermediate layout containing the text. |
line | Information defining the currently processed line. |
Reimplemented from kanzi::TextShaper.
Iterates all layouted glyphs on the line and adjusts their positions based on the shaping results.
- Parameters
-
layout | Pointer to intermediate layout containing the text. |
line | Information defining the currently processed line. |
Reimplemented from kanzi::TextShaper.
void kanzi::ItypeTextShaper::cleanup |
( |
| ) |
|
|
overridevirtual |
Cleans up the data that this text shaper used for shaping a specific text run.
You must call this function at the end of every text shaping run.
Reimplemented from kanzi::TextShaper.
The documentation for this class was generated from the following file: