Based on the supplied script and font, these functions create a new text layout instance.
Parameter | Description |
---|---|
layout |
Pointer to the handle of the newly created text layout instance. |
engine |
Handle of the associated Standard Engine instance. |
font_index |
Font index of the font or font instance in the Font Catalog (associated with the above Standard Engine instance) for which the text layout instance is to be created. |
script_code |
Script code that identifies the script for which the text layout instance is to be created. Must be a code from the list of defined scripts. |
language_code |
Language code that identifies the language for which the text layout instance is to be created. Must be a code from the list of defined languages. |
typo_flags |
Typographic control flags. Use 0 for no specific typographic features, 1 for kerning, 2 for ligature formation, and 3 for kerning and ligature formation. Others values are reserved for future. |
If the initialization was successful, the return value is 1 and layout holds a handle of the newly created text layout instance. Otherwise, the functions return 0 and layout holds DV_NULL.
Before a new layout instance can be created, applications must initialize D-Type Standard Engine (D-Type Font Engine and Rasterizer) and obtain its Standard Engine instance (engine). In addition, applications should obtain a valid font index from the Font Catalog associated with that Standard Engine instance.
Please remember that each call to lxLayoutIni or lxLayoutIniPlus takes some time because the corresponding font must be accessed to obtain any required font layout tables. Therefore, avoid calling lxLayoutIni or lxLayoutIniPlus repeatedly for the same font, script, language and/or typographic flags. Alternatively, use the built-in caching subsystem to speed up the text layout process.