1# OH_Drawing_Font_Metrics 2 3 4## Overview 5 6The **OH_Drawing_Font_Metrics** struct describes the measurement information about a font. 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| uint32_t [fFlags](#fflags) | Measurement information that is valid.| 21| float [top](#top) | Maximum distance from the baseline to the highest coordinate of a character.| 22| float [ascent](#ascent) | Recommended distance from the baseline to the highest coordinate of a character.| 23| float [descent](#descent) | Recommended distance from the baseline to the lowest coordinate of a character.| 24| float [bottom](#bottom) | Maximum distance from the baseline to the lowest coordinate of a character.| 25| float [leading](#leading) | Interline spacing.| 26| float [avgCharWidth](#avgcharwidth) | Average character width, or zero if unknown.| 27| float [maxCharWidth](#maxcharwidth) | Maximum character width, or zero if unknown.| 28| float [xMin](#xmin) | Maximum distance to the leftmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended.| 29| float [xMax](#xmax) | Maximum distance to the rightmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended.| 30| float [xHeight](#xheight) | Height of a lowercase letter, or zero if unknown. Generally, the value is a negative value.| 31| float [capHeight](#capheight) | Height of an uppercase letter, or zero if unknown. Generally, the value is a negative value.| 32| float [underlineThickness](#underlinethickness) | Thickness of the underline.| 33| float [underlinePosition](#underlineposition) | Position of the underline, that is, vertical distance from the baseline to the top of the underline. Generally, the value is a positive value.| 34| float [strikeoutThickness](#strikeoutthickness) | Thickness of the strikethrough.| 35| float [strikeoutPosition](#strikeoutposition) | Position of the strikethrough, that is, vertical distance from the baseline to the bottom of the strikethrough. Generally, the value is a negative value.| 36 37 38## Member Variable Description 39 40 41### ascent 42 43``` 44float OH_Drawing_Font_Metrics::ascent 45``` 46 47**Description** 48 49Recommended distance from the baseline to the highest coordinate of a character. 50 51 52### avgCharWidth 53 54``` 55float OH_Drawing_Font_Metrics::avgCharWidth 56``` 57 58**Description** 59 60Average character width, or zero if unknown. 61 62 63### bottom 64 65``` 66float OH_Drawing_Font_Metrics::bottom 67``` 68 69**Description** 70 71Maximum distance from the baseline to the lowest coordinate of a character. 72 73 74### capHeight 75 76``` 77float OH_Drawing_Font_Metrics::capHeight 78``` 79 80**Description** 81 82Height of an uppercase letter, or zero if unknown. Generally, the value is a negative value. 83 84 85### descent 86 87``` 88float OH_Drawing_Font_Metrics::descent 89``` 90 91**Description** 92 93Recommended distance from the baseline to the lowest coordinate of a character. 94 95 96### fFlags 97 98``` 99uint32_t OH_Drawing_Font_Metrics::fFlags 100``` 101 102**Description** 103 104Measurement information that is valid. 105 106 107### leading 108 109``` 110float OH_Drawing_Font_Metrics::leading 111``` 112 113**Description** 114 115Interline spacing. 116 117 118### maxCharWidth 119 120``` 121float OH_Drawing_Font_Metrics::maxCharWidth 122``` 123 124**Description** 125 126Maximum character width, or zero if unknown. 127 128 129### strikeoutPosition 130 131``` 132float OH_Drawing_Font_Metrics::strikeoutPosition 133``` 134 135**Description** 136 137Position of the strikethrough, that is, vertical distance from the baseline to the bottom of the strikethrough. Generally, the value is a negative value. 138 139 140### strikeoutThickness 141 142``` 143float OH_Drawing_Font_Metrics::strikeoutThickness 144``` 145 146**Description** 147 148Thickness of the strikethrough. 149 150 151### top 152 153``` 154float OH_Drawing_Font_Metrics::top 155``` 156 157**Description** 158 159Maximum distance from the baseline to the highest coordinate of a character. 160 161 162### underlinePosition 163 164``` 165float OH_Drawing_Font_Metrics::underlinePosition 166``` 167 168**Description** 169 170Position of the underline, that is, vertical distance from the baseline to the top of the underline. Generally, the value is a positive value. 171 172 173### underlineThickness 174 175``` 176float OH_Drawing_Font_Metrics::underlineThickness 177``` 178 179**Description** 180 181Thickness of the underline. 182 183 184### xHeight 185 186``` 187float OH_Drawing_Font_Metrics::xHeight 188``` 189 190**Description** 191 192Height of a lowercase letter, or zero if unknown. Generally, the value is a negative value. 193 194 195### xMax 196 197``` 198float OH_Drawing_Font_Metrics::xMax 199``` 200 201**Description** 202 203Maximum distance to the rightmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended. 204 205 206### xMin 207 208``` 209float OH_Drawing_Font_Metrics::xMin 210``` 211 212**Description** 213 214Maximum distance to the leftmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended. 215