package
0.1.1
Repository: https://github.com/go-text/typesetting.git
Documentation: pkg.go.dev

# README

shaping

This text shaping library is shared by multiple Go UI toolkits including Fyne, and GIO.

# Functions

NewSliceIterator returns a [RunIterator] backed by an already-shaped slice of [Output]s.
SplitByFace split the runes from 'input' to several items, sharing the same characteristics as 'input', expected for the `Face` which is set to the return value of the `Fontmap.ResolveFace` call.
SplitByFontGlyphs split the runes from 'input' to several items, sharing the same characteristics as 'input', expected for the `Face` which is set to the first font among 'availableFonts' providing support for all the runes in the item.

# Constants

Always means that lines will always choose to break within words if it means that more text can fit on the line.
Never means that words will never be broken internally, allowing them to exceed the specified maxWidth.
WhenNecessary means that lines will only be broken within words when the word cannot fit on the next line by itself or during truncation to preserve as much of the final word as possible.

# Structs

Bounds describes the minor-axis bounds of a line of text.
FontFeature sets one font feature.
Glyph describes the attributes of a single glyph from a single font face in a shaped output.
HarfbuzzShaper implements the Shaper interface using harfbuzz.
No description provided by the author
LineWrapper holds reusable state for a line wrapping operation.
Output describes the dimensions and content of shaped text.
Range indicates the location of a sequence of elements within a longer slice.
Segmenter holds a state used to split input according to three caracteristics : text direction (bidi), script, and face.
WrapConfig provides line-wrapper settings.
WrappedLine is the result of wrapping one line of text.

# Interfaces

Fontmap provides a general mechanism to select a face to use when shaping text.
RunIterator defines a type that can incrementally provide shaped text.
Shaper describes the signature of a font shaping operation.

# Type aliases

Line holds runs of shaped text wrapped onto a single line.
LineBreakPolicy specifies when considering a line break within a "word" or UAX#14 segment is allowed.