Shapes text and returns the final pen position as [x, y]. Useful for chaining multiple shaped runs (e.g. mixed-style text on one line) where you need to know where the next run should start.
UTF-8 text to shape.
Base font.
true for LTR text, false for RTL.
Line-wrap width in pixels.
Starting X offset.
Starting Y offset (baseline).
Float32Array of length 2: [endX, endY].
Shapes the given UTF-8 text with the provided font and returns an SkTextBlob. Returns null if shaping produces no glyphs (e.g. empty string or font has no matching glyphs).
UTF-8 text to shape.
Base font (size, typeface, etc.).
true for LTR text, false for RTL.
Line-wrap width in pixels. Pass a very large value (e.g. Infinity is clamped — use 1e9) to disable wrapping.
X offset embedded into all glyph positions.
Y offset (baseline) embedded into all glyph positions.
Full-control shaping: combines font fallback (via fontMgr) with explicit OpenType features. Pass null for fontMgr to use only the primary font.
Features are applied per UTF-8 byte range [start, end). To apply a feature to the entire string use start=0 and end equal to the byte length of the text.
UTF-8 text to shape.
Primary font.
Font manager for fallback (may be null).
true for LTR, false for RTL.
Line-wrap width in pixels.
X offset embedded into all glyph positions.
Y offset (baseline) embedded into all glyph positions.
OpenType features to apply.
Like shapeTextToBlob but uses fontMgr for automatic per-run font
fallback. When a glyph is not found in font, fontMgr is searched
for a face that covers the missing codepoints. Essential for correct
rendering of mixed-script or multilingual text.
UTF-8 text to shape.
Primary font; fallback fonts are sourced from fontMgr.
Font manager used to resolve missing glyphs (e.g. a TypefaceFontProvider with multiple faces registered).
true for LTR text, false for RTL.
Line-wrap width in pixels.
X offset embedded into all glyph positions.
Y offset (baseline) embedded into all glyph positions.
A Shaper wraps SkShaper and provides text shaping — converting UTF-8 strings into positioned glyph runs (SkTextBlob) ready for drawing on a Canvas. Requires fonts to be compiled in (not available in no-font builds).