diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 47f6f806a..cfacdf1ec 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -350,6 +350,7 @@ hb_coretext_font_set_funcs
hb-directwrite 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 diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc index bc9745025..dd03454b6 100644 --- a/src/hb-directwrite.cc +++ b/src/hb-directwrite.cc @@ -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. diff --git a/src/hb-directwrite.h b/src/hb-directwrite.h index 9430259e8..121569c15 100644 --- a/src/hb-directwrite.h +++ b/src/hb-directwrite.h @@ -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 */