setLocations(_:startingGlyphIndexes:count:forGlyphRange:)
Sets locations for many glyph ranges at once.
Declaration
func setLocations(_ locations: NSPointArray, startingGlyphIndexes glyphIndexes: UnsafeMutablePointer<Int>, count: Int, forGlyphRange glyphRange: NSRange)Parameters
- locations:
The locations to which the first glyph in each range is set, relative to the origin of the glyph’s line fragment origin.
- glyphIndexes:
Indexes in
glyphRangeof the glyphs whose locations are set. - count:
The number of glyphs whose locations are set.
- glyphRange:
The entire glyph range containing all the glyphs whose locations are set.
Discussion
This method enables the typesetter to set locations for glyph ranges in bulk. All of the specified glyph indexes should lie within the specified glyph range. The first of them should be equal to glyphRange.location, and the remainder should increase monotonically. Each location is set as the location for the range beginning at the corresponding glyph index, and continuing until the subsequent glyph index, or until the end of the glyph range for the last location. Thus this method is equivalent to calling setLocation(_:forStartOfGlyphRange:) for a set of ranges covering all of the glyphs in glyphRange.
This method is used by the layout mechanism and should be invoked only during typesetting, in almost all cases only by the typesetter. For example, a custom typesetter might invoke it.
See Also
Methods
showCGGlyphs(_:positions:count:font:matrix:attributes:in:)invalidateGlyphs(onLayoutInvalidationForGlyphRange:)invalidateLayout(forCharacterRange:isSoft:actualCharacterRange:)textStorage(_:edited:range:changeInLength:invalidatedRange:)insertGlyph(_:atGlyphIndex:characterIndex:)insertGlyphs(_:length:forStartingGlyphAt:characterIndex:)glyph(at:)glyph(at:isValidIndex:)replaceGlyph(at:withGlyph:)getGlyphs(_:range:)getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:)getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)deleteGlyphs(in:)setCharacterIndex(_:forGlyphAt:)intAttribute(_:forGlyphAt:)