intAttribute(_:forGlyphAt:)
Returns the value of the attribute identified by the given attribute tag for the glyph at the given index.
Declaration
func intAttribute(_ attributeTag: Int, forGlyphAt glyphIndex: Int) -> IntParameters
- attributeTag:
The attribute whose value is returned.
- glyphIndex:
Index of the glyph whose attribute value is returned.
Return Value
The value of the attribute identified by attributeTag and glyphIndex.
Discussion
Subclasses that define their own custom attributes must override this method to access their own storage for the attribute values. Nonnegative tags are reserved by Apple; you can define your own attributes with negative tags and set values using setIntAttribute(_:value:forGlyphAt:).
If noncontiguous layout is not enabled, this method causes generation of all glyphs up to and including glyphIndex. This method is primarily for the use of the glyph generator and typesetter.
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:)setIntAttribute(_:value:forGlyphAt:)