harmony 鸿蒙drawing_font_mgr.h

  • 2025-06-12
  • 浏览 (3)

drawing_font_mgr.h

Overview

The drawing_font_mgr.h file declares the functions related to font management in the drawing module. The functions can be used to load fonts and match available fonts in the system.

File to include: <native_drawing/drawing_font_mgr.h>

Library: libnative_drawing.so

Since: 12

Related module: Drawing

Summary

Functions

Name Description
OH_Drawing_FontMgr * OH_Drawing_FontMgrCreate (void) Creates an OH_Drawing_FontMgr object, which can be used only to manage system fonts.
void OH_Drawing_FontMgrDestroy (OH_Drawing_FontMgr *) Destroys an OH_Drawing_FontMgr object and reclaims the memory occupied by the object.
int OH_Drawing_FontMgrGetFamilyCount (OH_Drawing_FontMgr *) Obtains the number of font families.
char * OH_Drawing_FontMgrGetFamilyName (OH_Drawing_FontMgr *, int index) Obtains the font family name based on an index.
void OH_Drawing_FontMgrDestroyFamilyName (char *familyName) Reclaims the memory occupied by a font family name.
OH_Drawing_FontStyleSet * OH_Drawing_FontMgrCreateFontStyleSet (OH_Drawing_FontMgr *, int index) Creates a font style set from an OH_Drawing_FontMgr object.
void OH_Drawing_FontMgrDestroyFontStyleSet (OH_Drawing_FontStyleSet *) Reclaims the memory occupied by a font style set.
OH_Drawing_FontStyleSet * OH_Drawing_FontMgrMatchFamily (OH_Drawing_FontMgr *, const char *familyName) Obtains a font style set based on a font family name.
OH_Drawing_Typeface * OH_Drawing_FontMgrMatchFamilyStyle (OH_Drawing_FontMgr *, const char *familyName, OH_Drawing_FontStyleStruct) Obtains a typeface based on the font style information and font family name.
OH_Drawing_Typeface * OH_Drawing_FontMgrMatchFamilyStyleCharacter (OH_Drawing_FontMgr *, const char *familyName, OH_Drawing_FontStyleStruct, const char *bcp47[], int bcp47Count, int32_t character) Obtains a typeface for the specified character. A null pointer is returned only when no typeface corresponding to the input UTF-8 character is found in the OH_Drawing_FontMgr object.
OH_Drawing_Typeface * OH_Drawing_FontStyleSetCreateTypeface (OH_Drawing_FontStyleSet *, int index) Obtains a typeface for the specified index.
OH_Drawing_FontStyleStruct OH_Drawing_FontStyleSetGetStyle (OH_Drawing_FontStyleSet *, int32_t index, char **styleName) Obtains the font style.
void OH_Drawing_FontStyleSetFreeStyleName (char **styleName) Reclaims the memory occupied by a font style.
OH_Drawing_Typeface * OH_Drawing_FontStyleSetMatchStyle (OH_Drawing_FontStyleSet *, OH_Drawing_FontStyleStruct fontStyleStruct) Obtains the typeface closest to the font style.
int OH_Drawing_FontStyleSetCount (OH_Drawing_FontStyleSet *) Obtains the number of fonts in the font style set.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkGraphics 2D

harmony 鸿蒙BufferHandle

harmony 鸿蒙ColorSpacePrimaries

harmony 鸿蒙DisplaySoloist_ExpectedRateRange

harmony 鸿蒙_drawing

harmony 鸿蒙NativeColorSpaceManager

harmony 鸿蒙NativeDisplaySoloist

harmony 鸿蒙NativeVsync

harmony 鸿蒙NativeWindow

harmony 鸿蒙OH_Drawing_BitmapFormat

0  赞