[directwrite] Add hb_directwrite_face_get_dw_font_face()

A new name for hb_directwrite_face_get_font_face(), which is now
deprecated.

Part of https://github.com/harfbuzz/harfbuzz/issues/5084
This commit is contained in:
Khaled Hosny 2025-02-28 00:14:25 +02:00
parent 8226f597ac
commit 484e8d4997
3 changed files with 32 additions and 2 deletions

View file

@ -350,6 +350,7 @@ hb_coretext_font_set_funcs
<SECTION>
<FILE>hb-directwrite</FILE>
hb_directwrite_face_create
hb_directwrite_face_get_dw_font_face
hb_directwrite_face_get_font_face
hb_directwrite_font_create
hb_directwrite_font_get_dw_font

View file

@ -867,6 +867,24 @@ hb_directwrite_face_create (IDWriteFontFace *dw_face)
_hb_directwrite_face_release);
}
/**
* hb_directwrite_face_get_dw_font_face:
* @face: a #hb_face_t object
*
* Gets the DirectWrite IDWriteFontFace associated with @face.
*
* Return value: DirectWrite IDWriteFontFace object corresponding to the given input
*
* XSince: REPLACEME
**/
IDWriteFontFace *
hb_directwrite_face_get_dw_font_face (hb_face_t *face)
{
return face->data.directwrite->fontFace;
}
#ifndef HB_DISABLE_DEPRECATED
/**
* hb_directwrite_face_get_font_face:
* @face: a #hb_face_t object
@ -876,13 +894,16 @@ hb_directwrite_face_create (IDWriteFontFace *dw_face)
* Return value: DirectWrite IDWriteFontFace object corresponding to the given input
*
* Since: 2.5.0
* XDeprecated: REPLACEME: Use hb_directwrite_face_get_dw_font_face() instead
**/
IDWriteFontFace *
hb_directwrite_face_get_font_face (hb_face_t *face)
{
return face->data.directwrite->fontFace;
return hb_directwrite_face_get_dw_font_face (face);
}
#endif
/**
* hb_directwrite_font_create:
* @dw_font: a DirectWrite IDWriteFont object.

View file

@ -33,7 +33,7 @@ HB_EXTERN hb_face_t *
hb_directwrite_face_create (IDWriteFontFace *dw_face);
HB_EXTERN IDWriteFontFace *
hb_directwrite_face_get_font_face (hb_face_t *face);
hb_directwrite_face_get_dw_font_face (hb_face_t *face);
HB_EXTERN hb_font_t *
hb_directwrite_font_create (IDWriteFont *dw_font);
@ -41,6 +41,14 @@ hb_directwrite_font_create (IDWriteFont *dw_font);
HB_EXTERN IDWriteFont *
hb_directwrite_font_get_dw_font (hb_font_t *font);
#ifndef HB_DISABLE_DEPRECATED
HB_DEPRECATED_FOR (hb_directwrite_face_get_dw_font_face)
HB_EXTERN IDWriteFontFace *
hb_directwrite_face_get_font_face (hb_face_t *face);
#endif
HB_END_DECLS
#endif /* HB_DIRECTWRITE_H */