#[repr(C)]pub struct OH_Drawing_Font_Metrics {Show 16 fields
pub flags: u32,
pub top: f32,
pub ascent: f32,
pub descent: f32,
pub bottom: f32,
pub leading: f32,
pub avgCharWidth: f32,
pub maxCharWidth: f32,
pub xMin: f32,
pub xMax: f32,
pub xHeight: f32,
pub capHeight: f32,
pub underlineThickness: f32,
pub underlinePosition: f32,
pub strikeoutThickness: f32,
pub strikeoutPosition: f32,
}Expand description
@brief This struct describes the measurement information about a font.
@since 12 @version 1.0
Fields§
§flags: u32Measurement information that is valid.
@since 12
top: f32Maximum distance from the baseline to the highest coordinate of a character.
@since 12
ascent: f32Recommended distance from the baseline to the highest coordinate of a character.
@since 12
descent: f32Recommended distance from the baseline to the lowest coordinate of a character.
@since 12
bottom: f32Maximum distance from the baseline to the lowest coordinate of a character.
@since 12
leading: f32Gap between rows.
@since 12
avgCharWidth: f32Average character width, or zero if unknown.
@since 12
maxCharWidth: f32Maximum character width, or zero if unknown.
@since 12
xMin: f32Maximum distance to the leftmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended.
@since 12
xMax: f32Maximum distance to the rightmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended.
@since 12
xHeight: f32Height of a lowercase letter, or zero if unknown. Generally, the value is a negative value.
@since 12
capHeight: f32Height of an uppercase letter, or zero if unknown. Generally, the value is a negative value.
@since 12
underlineThickness: f32@brief Thickness of the underline.
@since 12
underlinePosition: f32Position of the underline, that is, vertical distance from the baseline to the top of the underline. Generally, the value is a positive value.
@since 12
strikeoutThickness: f32Thickness of the strikethrough.
@since 12
strikeoutPosition: f32Position of the strikethrough, that is, vertical distance from the baseline to the bottom of the strikethrough. Generally, the value is a negative value.
@since 12