#include <ParagraphLayout.h>
The ParagraphLayout
object will analyze the text into runs of text in the same font, script and direction, and will create a LayoutEngine
object for each run. The LayoutEngine
will transform the characters into glyph codes in visual order.
Clients can use this to break a paragraph into lines, and to display the glyphs in each line.
Note that the ICU layout engine has been deprecated and removed. You may use this class with the HarfBuzz icu-le-hb wrapper, see http://www.freedesktop.org/wiki/Software/HarfBuzz/
See https://unicode-org.github.io/icu/userguide/layoutengine for special build instructions.
Definition at line 51 of file ParagraphLayout.h.
◆ ParagraphLayout() icu::ParagraphLayout::ParagraphLayout ( const LEUnicode chars[], le_int32 count, const FontRuns * fontRuns, const ValueRuns * levelRuns, const ValueRuns * scriptRuns, const LocaleRuns * localeRuns, UBiDiLevel paragraphLevel, le_bool vertical, LEErrorCode & status )Construct a ParagraphLayout
object for a styled paragraph.
The paragraph is specified as runs of text all in the same font. An LEFontInstance
object and a limit offset are specified for each font run. The limit offset is the offset of the character immediately after the font run.
Clients can optionally specify directional runs and / or script runs. If these aren't specified they will be computed.
If any errors are encountered during construction, status
will be set, and the object will be set to be empty.
FontRuns
object representing the font runs. levelRuns is a pointer to a ValueRuns
object representing the directional levels. If this pointer in nullptr
the levels will be determined by running the Unicode Bidi algorithm. scriptRuns is a pointer to a ValueRuns
object representing script runs. If this pointer in nullptr
the script runs will be determined using the Unicode code points. localeRuns is a pointer to a LocaleRuns
object representing locale runs. The Locale
objects are used to determine the language of the text. If this pointer is nullptr
the default locale will be used for all of the text. paragraphLevel is the directionality of the paragraph, as in the UBiDi object. vertical is true
if the paragraph should be set vertically. status will be set to any error code encountered during construction.
The destructor.
Virtual so that it works correctly with subclasses.
Return the max ascent value for all the fonts in the paragraph.
Return the max descent value for all the fonts in the paragraph.
Return the max leading value for all the fonts in the paragraph.
Return the resolved paragraph level.
This is useful for those cases where the bidi analysis has determined the level based on the first strong character in the paragraph.
Definition at line 648 of file ParagraphLayout.h.
References ubidi_getParaLevel().
◆ getStaticClassID() static UClassID icu::ParagraphLayout::getStaticClassID ( ) inlinestatic ◆ getTextDirection()Return the directionality of the text in the paragraph.
UBIDI_LTR
if the text is all left to right, UBIDI_RTL
if the text is all right to left, or UBIDI_MIXED
if the text has mixed direction.
Definition at line 653 of file ParagraphLayout.h.
References ubidi_getDirection().
◆ isComplex() static le_bool icu::ParagraphLayout::isComplex ( const LEUnicode chars[], le_int32 count ) staticExamine the given text and determine if it contains characters in any script which requires complex processing to be rendered correctly.
true
if any of the text requires complex processing.
Convenience method for determining if paragraph layout processing is complete ( i.e.
there are no more lines left to process. )
Return a ParagraphLayout::Line
object which represents next line in the paragraph.
The width of the line is specified each time so that it can be varied to support arbitrary paragraph shapes.
width
is less than or equal to zero, a ParagraphLayout::Line
object representing the rest of the paragraph will be returned.
ParagraphLayout::Line
object which represents the line. The caller is responsible for deleting the object. Returns nullptr
if there are no more lines in the paragraph.
The documentation for this class was generated from the following file:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4