Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# TextShaper.GlyphsConsumer

*** ** * ** ***

` public static interface TextShaper.GlyphsConsumer `   
` `

|---|
| android.text.TextShaper.GlyphsConsumer |

<br />

*** ** * ** ***

A consumer interface for accepting text shape result.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/text/TextShaper.GlyphsConsumer#accept(int,%20int,%20android.graphics.text.PositionedGlyphs,%20android.text.TextPaint)(int start, int count, https://developer.android.com/reference/android/graphics/text/PositionedGlyphs glyphs, https://developer.android.com/reference/android/text/TextPaint paint) ` Accept text shape result. |

## Public methods

### accept

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void accept (int start, 
                int count, 
                PositionedGlyphs glyphs, 
                TextPaint paint)
```

Accept text shape result. The implementation must not keep reference of paint since it will be mutated for the subsequent styles. Also, for saving heap size, keep only necessary members in the `https://developer.android.com/reference/android/text/TextPaint` instead of copying `https://developer.android.com/reference/android/text/TextPaint` object.

<br />

| Parameters ||
|---|---|
| `start` | `int`: The start index of the shaped text. Value is 0 or greater <br /> |
| `count` | `int`: The length of the shaped text. Value is 0 or greater <br /> |
| `glyphs` | `PositionedGlyphs`: The shape result. This value cannot be `null`. <br /> |
| `paint` | `TextPaint`: The paint to be used for drawing. This value cannot be `null`. <br /> |