C API for paragraph layout. More...
#include "unicode/ubidi.h"
#include "layout/LETypes.h"
#include "plruns.h"
Go to the source code of this file.
U_CAPI pl_paragraph * pl_create (const LEUnicode chars[], le_int32 count, const pl_fontRuns *fontRuns, const pl_valueRuns *levelRuns, const pl_valueRuns *scriptRuns, const pl_localeRuns *localeRuns, UBiDiLevel paragraphLevel, le_bool vertical, LEErrorCode *status) Construct aParagraphLayout
object for a styled paragraph. More...
pl_line
object which represents next line in the paragraph. More...
ParagraphLayout::VisualRun
object for a given visual run in the line. More...
le_font
object which represents the font of the visual run. More...
C API for paragraph layout.
This is a technology preview. The API may change significantly.
Definition in file playout.h.
◆ pl_lineThe opaque type for a line in a paragraph layout.
Definition at line 44 of file playout.h.
◆ pl_paragraphThe opaque type for a paragraph layout.
Definition at line 37 of file playout.h.
◆ pl_visualRunThe opaque type for a visual run in a line.
Definition at line 51 of file playout.h.
◆ pl_close()Close the given paragraph layout object.
pl_paragraph
object to be closed. Once this routine returns the object can no longer be referenced
Close the given line object.
Line objects are created by pl_nextLine
but it is the client's responsibility to close them by calling this routine.
pl_line
object to close.
Count the number of visual runs in the line.
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.
pl_fontRuns
object representing the font runs. levelRuns is a pointer to a pl_valueRuns
object representing the directional levels. If this pointer in NULL
the levels will be determined by running the Unicode Bidi algorithm. scriptRuns is a pointer to a pl_valueRuns
object representing script runs. If this pointer in NULL
the script runs will be determined using the Unicode code points. localeRuns is a pointer to a pl_localeRuns
object representing locale runs. The Locale
objects are used to determine the language of the text. If this pointer is NULL
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.
pl_paragraph
object. The object will remain valid until pl_close
is called.
Return the max ascent value for all the fonts in the paragraph.
pl_paragraph
Return the max descent value for all the fonts in the paragraph.
pl_paragraph
Return the max leading value for all the fonts in the paragraph.
pl_paragraph
Get the ascent of the line.
This is the maximum ascent of all the fonts on the line.
Get the descent of the line.
This is the maximum descent of all the fonts on the line.
Get the leading of the line.
This is the maximum leading of all the fonts on the line.
Get a ParagraphLayout::VisualRun
object for a given visual run in the line.
pl_line
object. runIndex is the index of the run, in visual order.
pl_visualRun
object representing the visual run. This object is owned by the pl_line
object which created it, and will remain valid for as long as the pl_line
object is valid.
Get the width of the line.
This is a convenience method which returns the last X position of the last visual run in the line.
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.
pl_paragraph
Return the directionality of the text in the paragraph.
pl_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.
A convenience method which returns the ascent value for the font associated with this run.
pl_visualRun
object.
A convenience method which returns the descent value for the font associated with this run.
pl_visualRun
object.
Get the direction of the visual run.
pl_visualRun
object.
UBIDI_LTR
if the run is left-to-right and UBIDI_RTL
if the line is right-to-left.
Get the le_font
object which represents the font of the visual run.
This will always be a non-composite font.
pl_visualRun
object.
le_font
object which represents the font of the visual run.
Get the number of glyphs in the visual run.
pl_visualRun
object.
Get the glyphs in the visual run.
Glyphs with the values 0xFFFE
and 0xFFFF
should be ignored.
pl_visualRun
object.
pl_visualRun
object and must not be deleted. It will remain valid as long as the pl_visualRun
object is valid.
Get the glyph-to-character map for this visual run.
This maps the indices into the glyph array to indices into the character array used to create the paragraph.
pl_visualRun
object.
pl_visualRun
object and must not be deleted. It will remain valid as long as the pl_visualRun
object is valid.
A convenience method which returns the leading value for the font associated with this run.
pl_visualRun
object.
Get the (x, y) positions of the glyphs in the visual run.
To simplify storage management, the x and y positions are stored in a single array with the x positions at even offsets in the array and the corresponding y position in the following odd offset. There is an extra (x, y) pair at the end of the array which represents the advance of the final glyph in the run.
pl_visualRun
object.
pl_visualRun
object and must not be deleted. It will remain valid as long as the pl_visualRun
object is valid.
Examine 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.
Return a pl_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.
pl_paragraph
width is the width of the line. If 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 NULL
if there are no more lines in the paragraph.
Reset line breaking to start from the beginning of the paragraph.
pl_paragraph
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