# drawing_text_run.h ## Overview The **drawing_text_run.h** file declares the capabilities of runs, such as obtaining the typographic boundary and drawing. **File to include**: **Library**: libnative_drawing.so **Since**: 14 **Related module**: [Drawing](_drawing.md) ## Summary ### Functions | Name| Description| | -------- | -------- | | [OH_Drawing_Array](_drawing.md#oh_drawing_array) \* [OH_Drawing_GetRunStringIndices](_drawing.md#oh_drawing_getrunstringindices) (OH_Drawing_Run \*run, int64_t start, int64_t length) | Obtains character indices of glyphs within a specified range of a run, where the indices are offsets relative to the entire paragraph. | | uint64_t [OH_Drawing_GetRunStringIndicesByIndex](_drawing.md#oh_drawing_getrunstringindicesbyindex) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*stringIndices, size_t index) | Obtains character indices of glyphs in a run by index. | | void [OH_Drawing_DestroyRunStringIndices](_drawing.md#oh_drawing_destroyrunstringindices) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*stringIndices) | Releases the pointer to a character index array. | | void [OH_Drawing_GetRunStringRange](_drawing.md#oh_drawing_getrunstringrange) (OH_Drawing_Run \*run, uint64_t \*location, uint64_t \*length) | Obtains the range of glyphs generated by a run. | | float [OH_Drawing_GetRunTypographicBounds](_drawing.md#oh_drawing_getruntypographicbounds) (OH_Drawing_Run \*run, float \*ascent, float \*descent, float \*leading) | Obtains the typographic boundary of a run. The typographic boundary is related to the font and font size used for typography, but not the characters within the text. | | void [OH_Drawing_RunPaint](_drawing.md#oh_drawing_runpaint) ([OH_Drawing_Canvas](_drawing.md#oh_drawing_canvas) \*canvas, OH_Drawing_Run \*run, double x, double y) | Paints the text contained in a run on the canvas. | | [OH_Drawing_Rect](_drawing.md#oh_drawing_rect) \* [OH_Drawing_GetRunImageBounds](_drawing.md#oh_drawing_getrunimagebounds) (OH_Drawing_Run \*run) | Obtains the image boundary of a run. The image boundary is related to characters and is equivalent to the visual boundary. | | void [OH_Drawing_DestroyRunImageBounds](_drawing.md#oh_drawing_destroyrunimagebounds) ([OH_Drawing_Rect](_drawing.md#oh_drawing_rect) \*rect) | Releases the pointer to an image boundary object of a run. | | [OH_Drawing_Array](_drawing.md#oh_drawing_array) \* [OH_Drawing_GetRunGlyphs](_drawing.md#oh_drawing_getrunglyphs) (OH_Drawing_Run \*run, int64_t start, int64_t length) | Obtains an array of glyphs within the specified range of a run. | | uint16_t [OH_Drawing_GetRunGlyphsByIndex](_drawing.md#oh_drawing_getrunglyphsbyindex) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*glyphs, size_t index) | Obtains individual glyphs in a run by index. | | void [OH_Drawing_DestroyRunGlyphs](_drawing.md#oh_drawing_destroyrunglyphs) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*glyphs) | Releases the pointer to a glyph array in a run. | | [OH_Drawing_Array](_drawing.md#oh_drawing_array) \* [OH_Drawing_GetRunPositions](_drawing.md#oh_drawing_getrunpositions) (OH_Drawing_Run \*run, int64_t start, int64_t length) | Obtains the positions of glyphs within the specified range of a run. | | [OH_Drawing_Point](_drawing.md#oh_drawing_point) \* [OH_Drawing_GetRunPositionsByIndex](_drawing.md#oh_drawing_getrunpositionsbyindex) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*positions, size_t index) | Obtains the positions of individual glyphs in a run by index. | | void [OH_Drawing_DestroyRunPositions](_drawing.md#oh_drawing_destroyrunpositions) ([OH_Drawing_Array](_drawing.md#oh_drawing_array) \*positions) | Releases the pointer to a glyph position array in a run. | | uint32_t [OH_Drawing_GetRunGlyphCount](_drawing.md#oh_drawing_getrunglyphcount) (OH_Drawing_Run \*run) | Obtains the number of glyphs in a run. |