Retrieves the bounds for each glyph in glyphs. If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected. These are returned as flattened rectangles. For each glyph, there will be 4 floats for left, top, right, bottom (relative to 0, 0) for that glyph.
Optionalpaint: Paint | nullOptionaloutput: Float32Array<ArrayBufferLike>if provided, the results will be copied into this array.
Retrieves the glyph ids for each code point in the provided string. This call is passed to the typeface of this font. Note that glyph IDs are typeface-dependent; different faces may have different ids for the same code point.
OptionalnumCodePoints: numberthe number of code points in the string. Defaults to str.length.
Optionaloutput: GlyphIDArrayif provided, the results will be copied into this array.
Computes any intersections of a thick "line" and a run of positionsed glyphs. The thick line is represented as a top and bottom coordinate (positive for below the baseline, negative for above). If there are no intersections (e.g. if this is intended as an underline, and there are no "collisions") then the returned array will be empty. If there are intersections, the array will contain pairs of X coordinates [start, end] for each segment that intersected with a glyph.
the glyphs to intersect with
x,y coordinates (2 per glyph) for each glyph
top of the thick "line" to use for intersection testing
bottom of the thick "line" to use for intersection testing
array of [start, end] x-coordinate pairs. Maybe be empty.
Returns the outline path for the given glyph ID, or an empty Path if the glyph has no outline (bitmap glyph or invalid ID). Use font.getGlyphIDs(str) to obtain glyph IDs from a string first.
Retrieves the advanceX measurements for each glyph. If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected. One width per glyph is returned in the returned array.
Optionalpaint: Paint | nullOptionaloutput: Float32Array<ArrayBufferLike>if provided, the results will be copied into this array.
Returns the FontMetrics for this font.
Returns text scale on x-axis. Default value is 1.
Returns text size in points.
Returns text skew on x-axis. Default value is zero.
Returns the Typeface set for this font.
Returns embolden effect for this font. Default value is false.
Requests, but does not require, that edge pixels draw opaque or with partial transparency.
Requests, but does not require, to use bitmaps in fonts instead of outlines.
Set embolden effect for this font.
Requests, but does not require, linearly scalable font and glyph metrics.
For outline fonts 'true' means font and glyph metrics should ignore hinting and rounding. Note that some bitmap formats may not be able to scale linearly and will ignore this flag.
Sets the text scale on the x-axis.
Sets the text size in points on this font.
Sets the text-skew on the x axis for this font.
Requests, but does not require, that glyphs respect sub-pixel positioning.
Sets the typeface to use with this font. null means to clear the typeface and use the default one.
See SkFont.h for more on this class.