---
title: "baselineOffset(in:glyphIndex:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstypesetter/baselineoffset(in:glyphindex:)"
---

# baselineOffset(in:glyphIndex:)

Returns the distance from the bottom of the line fragment rectangle in which the glyph resides to the glyph baseline.

## Declaration

```swift
func baselineOffset(in layoutMgr: NSLayoutManager, glyphIndex: Int) -> CGFloat
```

## Parameters

- `layoutMgr`: The layout manager used for the drawing.
- `glyphIndex`: The index of the glyph in question.

## Return Value

Return Value The distance from the bottom of the line fragment rectangle in which the glyph resides to the glyph baseline.

## Discussion

Discussion The text system uses this value to calculate the vertical position of underlines.

## See Also

### Getting information about glyphs

- [printingAdjustment(in:forNominallySpacedGlyphRange:packedGlyphs:count:)](appkit/nstypesetter/printingadjustment(in:fornominallyspacedglyphrange:packedglyphs:count:).md)
