Contents

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) -> Int

Parameters

  • 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