Script Specific Text Shaping and Layout

Storyboard includes unidirectional text layout as part of the standard product offering. Support for bi-directional (mixed mode left-to-right and right-to-left) text is provided through commercial third party Crank Software partners.

Advanced text shaping and glyph positioning functionality for certain language scripts is provided in Storyboard by the libgre-plugins-harfbuzz plugin based on the functionality of the Harfbuzz text shaping library (harfbuzz.github.io). This text shaping technology is dependent on the FreeType font manager and advanced C++ toolchain support and is available for QNX, MacOS and most Linux platforms.

Advanced text shaping can have a significant impact on performance so it is disabled by default. In order to enable text shaping globally within an application for all text rendering set the text shaping script and language values into the application level grd_text_shaper_attrs variable. The value for this variable should be a string that identifies the desired text script and the language processing by their respective ISO codes and formatted as script=<script_code>;language=<language_code>

Script tags: https://en.wikipedia.org/wiki/ISO_15924
Language tags: https://en.wikipedia.org/wiki/ISO_639

For example, a sample Lua script to set the text shaping for Thai script may look like:


gre.set_value("grd_text_shaper_attrs", "script=Thai;lang=th")  

To disable the text shaping set the value to an empty string.


gre.set_value("grd_text_shaper_attrs", "")

Most latin languages do not require text shaping support and can receive an increase in performance by omitting the text shaping processing.