# `GSFont baseGlyphForName:suffix:test:`

*Instance Method*

Finds the longest dot-separated base name of `name` that resolves to a glyph accepted by `test`. this is useful for finding glyph info for alternate of PUA glyphs.

## Declaration

```swift
func baseGlyph(forName name: String, suffix outSuffix: AutoreleasingUnsafeMutablePointer<NSString?>?, test: ((GSGlyph) -> Bool)? = nil) -> GSGlyph?
```

```objc
- (GSGlyph *) baseGlyphForName:(NSString *) name suffix:(NSString **) outSuffix test:(BOOL (^)(GSGlyph *candidate)) test;
```

```python
baseGlyphForName_suffix_test_(name: str, candidate: GSGlyph, test) -> tuple[GSGlyph, str]
```

## Parameters

- `name` — Full glyph name, e.g. @“a.sc.alt”.
- `outSuffix` — On success, the cut off suffix including its leading dot, e.g. @”.alt”. Pass NULL if not needed. Only valid when the return value is non-nil; untouched otherwise.
- `test` — Called for each candidate, longest base name first. Return YES to accept. Pass nil to accept any glyph.

## Return Value

The accepted base glyph, or nil if no base name resolved.

