---
title: "setLocation(_:withAdvancements:forStartOfGlyphRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstypesetter/setlocation(_:withadvancements:forstartofglyphrange:)"
---

# setLocation(_:withAdvancements:forStartOfGlyphRange:)

Sets the location where the specified glyphs are laid out.

## Declaration

```swift
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 doc://com.apple.appkit/documentation/AppKit/NSTypesetter/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

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

- [characterRange(forGlyphRange:actualGlyphRange:)](appkit/nstypesetter/characterrange(forglyphrange:actualglyphrange:).md)
- [glyphRange(forCharacterRange:actualCharacterRange:)](appkit/nstypesetter/glyphrange(forcharacterrange:actualcharacterrange:).md)
- [setAttachmentSize(_:forGlyphRange:)](appkit/nstypesetter/setattachmentsize(_:forglyphrange:).md)
- [setBidiLevels(_:forGlyphRange:)](appkit/nstypesetter/setbidilevels(_:forglyphrange:).md)
- [setDrawsOutsideLineFragment(_:forGlyphRange:)](appkit/nstypesetter/setdrawsoutsidelinefragment(_:forglyphrange:).md)
- [setLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)](appkit/nstypesetter/setlinefragmentrect(_:forglyphrange:usedrect:baselineoffset:).md)
- [setNotShownAttribute(_:forGlyphRange:)](appkit/nstypesetter/setnotshownattribute(_:forglyphrange:).md)
