---
title: "fontWeight(at:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcaption/fontweight(at:)"
---

# fontWeight(at:)

Returns the font weight and range at the index position.

## Declaration

```swift
@nonobjc func fontWeight(at index: String.Index) -> (AVCaption.FontWeight, Range<String.Index>)
```

## Parameters

- `index`: A character position in the caption text.

## Return Value

Return Value A tuple that contains the font weight and range to which it applies.

## See Also

### Accessing font styles

- [fontStyle(at:)](avfoundation/avcaption/fontstyle(at:).md)
- [AVCaption.FontStyle](avfoundation/avcaption/fontstyle.md)
- [AVCaption.FontWeight](avfoundation/avcaption/fontweight.md)
- [decoration(at:)](avfoundation/avcaption/decoration(at:).md)
- [AVCaption.Decoration](avfoundation/avcaption/decoration.md)
