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