1# OH_Drawing_LineMetrics 2 3 4## Overview 5 6The **OH_Drawing_LineMetrics** struct describes the measurement information about a line of text. 7 8**Since**: 12 9 10**Related module**: [Drawing](_drawing.md) 11 12**Header file**: [drawing_text_typography.h](drawing__text__typography_8h.md) 13 14## Summary 15 16 17### Member Variables 18 19| Name| Description| 20| -------- | -------- | 21| double [ascender](#ascender) | Part of a lowercase letter that extends beyond the meanline.| 22| double [descender](#descender) | Part of a lowercase letter that extends below the baseline.| 23| double [capHeight](#capheight) | Height of an uppercase letter above the baseline.| 24| double [xHeight](#xheight) | Height of a lowercase letter, specifically the lowercase x, not including ascenders and descenders.| 25| double [width](#width) | Horizontal space taken up by a character.| 26| double [height](#height) | Line height.| 27| double [x](#x) | Distance from the left edge of the leftmost character to the left edge of the container. For left alignment, the value is 0. For right alignment, the value is the container width minus the text width.| 28| double [y](#y) | Height from the top edge of the character to the top of the container. The first line is 0, and the second line is the height of the first line.| 29| size_t [startIndex](#startindex) | Index of the first character in the line.| 30| size_t [endIndex](#endindex) | Index of the last character in the line.| 31| [OH_Drawing_Font_Metrics](_o_h___drawing___font___metrics.md) [firstCharMetrics](#firstcharmetrics) | Measurement information of the first character.| 32 33 34## Member Variable Description 35 36 37### ascender 38 39``` 40double OH_Drawing_LineMetrics::ascender 41``` 42 43**Description** 44 45Part of a lowercase letter that extends beyond the meanline. 46 47 48### capHeight 49 50``` 51double OH_Drawing_LineMetrics::capHeight 52``` 53 54**Description** 55 56Height of an uppercase letter above the baseline. 57 58 59### descender 60 61``` 62double OH_Drawing_LineMetrics::descender 63``` 64 65**Description** 66 67Part of a lowercase letter that extends below the baseline. 68 69 70### endIndex 71 72``` 73size_t OH_Drawing_LineMetrics::endIndex 74``` 75 76**Description** 77 78Index of the last character in the line. 79 80 81### firstCharMetrics 82 83``` 84OH_Drawing_Font_Metrics OH_Drawing_LineMetrics::firstCharMetrics 85``` 86 87**Description** 88 89Measurement information of the first character. 90 91 92### height 93 94``` 95double OH_Drawing_LineMetrics::height 96``` 97 98**Description** 99 100Line height. 101 102 103### startIndex 104 105``` 106size_t OH_Drawing_LineMetrics::startIndex 107``` 108 109**Description** 110 111Index of the first character in the line. 112 113 114### width 115 116``` 117double OH_Drawing_LineMetrics::width 118``` 119 120**Description** 121 122Horizontal space taken up by a character. 123 124 125### x 126 127``` 128double OH_Drawing_LineMetrics::x 129``` 130 131**Description** 132 133Distance from the left edge of the leftmost character to the left edge of the container. For left alignment, the value is 0. For right alignment, the value is the container width minus the text width. 134 135 136### xHeight 137 138``` 139double OH_Drawing_LineMetrics::xHeight 140``` 141 142**Description** 143 144Height of a lowercase letter, specifically the lowercase x, not including ascenders and descenders. 145 146 147### y 148 149``` 150double OH_Drawing_LineMetrics::y 151``` 152 153**Description** 154 155Height from the top edge of the character to the top of the container. The first line is 0, and the second line is the height of the first line. 156