openharmony 鸿蒙 capi-drawing-oh-drawing-font-metrics

2026-08-25 浏览 (1)

OH_Drawing_Font_Metrics

typedef struct {...} OH_Drawing_Font_Metrics

Overview

This struct describes the measurement information about a font.

Since: 12

Related module: Drawing

Header file: drawing_font.h

Summary

Member Variables

NameDescription
uint32_t flagsMeasurement information that is valid.
float topMaximum distance from the baseline to the highest coordinate of a character.
float ascentRecommended distance from the baseline to the highest coordinate of a character.
float descentRecommended distance from the baseline to the lowest coordinate of a character.
float bottomMaximum distance from the baseline to the lowest coordinate of a character.
float leadingGap between rows.
float avgCharWidthAverage character width, or zero if unknown.
float maxCharWidthMaximum character width, or zero if unknown.
float xMinMaximum distance to the leftmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended.
float xMaxMaximum distance to the rightmost of the font bounding box. Generally, the value is a negative value. Variable fonts are not recommended.
float xHeightHeight of a lowercase letter, or zero if unknown. Generally, the value is a negative value.
float capHeightHeight of an uppercase letter, or zero if unknown. Generally, the value is a negative value.
float underlineThicknessThickness of the underline.
float underlinePositionPosition of the underline, that is, vertical distance from the baseline to the top of the underline. Generally, the value is a positive value.
float strikeoutThicknessThickness of the strikethrough.
float strikeoutPositionPosition of the strikethrough, that is, vertical distance from the baseline to the bottom of the strikethrough. Generally, the value is a negative value.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-drawing-gpu-context-h

openharmony 鸿蒙 capi-drawing-nativepixelmap-

openharmony 鸿蒙 capi-nativevsync-oh-nativevsync-expectedraterange

openharmony 鸿蒙 capi-drawing-oh-drawing-brush

openharmony 鸿蒙 capi-drawing-oh-drawing-image-info

openharmony 鸿蒙 capi-drawing-text-linetypography-h

openharmony 鸿蒙 capi-oh-nativeimage-oh-nativeimage

openharmony 鸿蒙 capi-drawing-typeface-h

openharmony 鸿蒙 capi-drawing-brush-h

openharmony 鸿蒙 capi-nativewindow

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/6mhppfO8