Contents

setLocation(_:withAdvancements:forStartOfGlyphRange:)

Sets the location where the specified glyphs are laid out.

Declaration

func setLocation(_ location: NSPoint, withAdvancements advancements: UnsafePointer<CGFloat>!, forStartOfGlyphRange glyphRange: NSRange)

Parameters

  • location:

    The location where the glyphs in glyphRange are laid out. The x-coordinate of location is expressed relative to the line fragment rectangle origin, and the y-coordinate is expressed relative to the baseline previously specified by Setlinefragmentrect(_:forglyphrange:usedrect:baselineoffset:).

  • advancements:

    The nominal glyph advance width specified in the font metric information.

  • glyphRange:

    The range of glyphs whose layout location is being set. This series of glyphs can be displayed with a single PostScript show operation (a nominal range).

Discussion

Setting the location for a series of glyphs implies that the glyphs preceding it can’t be included in a single show operation.

Before setting the location for a glyph range, you must specify line fragment rectangle with setLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:).

A subclass can override this method to interact with custom glyph storage.

See Also

Interfacing with Glyph Storage