package
0.3.0
Repository: https://github.com/benoitkugler/textlayout.git
Documentation: pkg.go.dev

# Packages

Generator of the mapping from OpenType tags to BCP 47 tags && vice versa.

# Functions

Fetches the index of a given feature tag in the specified face's GSUB table or GPOS table, underneath the specified script and language.
IsDefaultIgnorable returns `true` for codepoints with the Default_Ignorable property (as defined in unicode data DerivedCoreProperties.txt).
NewBuffer allocate a storage with default options.
NewFont constructs a new font object from the specified face.
NewOTTagsFromScriptAndLanguage converts an `language.Script` and an `Language` to script and language tags.
ParseFeature parses one feature string (usually coming from a comma-separated list of font features).
ParseVariation parse the string representation of a variation of the form tag=value.
SelectLanguage fetches the index of the first language tag from `languageTags` in the specified layout table, underneath `scriptIndex`.
SelectScript selects an OpenType script from the `scriptTags` array, returning its index in the Scripts slice and the script tag.

# Constants

Flag indicating that special handling of the beginning of text paragraph can be applied to this buffer.
Text is set vertically from bottom to top.
Don't group cluster values.
Special value for language index indicating default or unsupported language.
Flag indicating that a dotted circle should not be inserted in the rendering of incorrect character sequences (such at <0905 093E>).
Flag indicating that special handling of the end of text paragraph can be applied to this buffer, similar to `Bot`.
Special setting for `Feature.End` to apply the feature from to the end of the buffer.
Special setting for `Feature.Start` to apply the feature from the start of the buffer.
Indicates that if input text is broken at the beginning of the cluster this glyph is part of, then both sides need to be re-shaped, as the result might be different.
Text is set horizontally from left to right.
Return cluster values grouped into monotone order.
Return cluster values grouped by graphemes into monotone order.
Special value for feature index indicating unsupported feature.
Special value for script index indicating unsupported script.
Flag indication that character with Default_Ignorable Unicode property should use the corresponding glyph from the font, instead of hiding them (done by replacing them with the space glyph and zeroing the advance width.) This flag takes precedence over `RemoveDefaultIgnorables`.
Flag indication that character with Default_Ignorable Unicode property should be removed from glyph string instead of hiding them (done by replacing them with the space glyph and zeroing the advance width.) `PreserveDefaultIgnorables` takes precedence over this flag.
Text is set horizontally from right to left.
Text is set vertically from top to bottom.

# Variables

UniscribeBugCompatible alters shaping of indic and khmer scripts: - when `false`, it applies the recommended shaping choices - when `true`, Uniscribe behavior is reproduced.

# Structs

Buffer is the main structure holding the input text segment and its properties before shaping, and output glyphs and their information after shaping.
Feature holds information about requested feature application.
Font is used internally as a light wrapper around the provided Face.
GlyphExtents is the same as fonts.GlyphExtents but with int type.
GlyphInfo holds information about the glyphs and their relation to input text.
GlyphPosition holds the positions of the glyph in both horizontal and vertical directions.
SegmentProperties holds various text properties of a `Buffer`.

# Interfaces

FaceOpentype adds support for advanced layout features found in Opentype/Truetype font files.

# Type aliases

ClusterLevel allows selecting more fine-grained Cluster handling.
Direction is the text direction.
Face is the interface providing font metrics and layout information.
No description provided by the author
Position stores a position, scaled according to the `Font` scale parameters.
ShappingOptions controls some fine tunning of the shaping (see the constants).