Install ot-funcs on newly created funcs

**Finally**!  Casual users can stop caring about font-funcs completely now,
like they haven't been needing to care re unicode-funcs for a few years.
This commit is contained in:
Behdad Esfahbod 2018-10-09 15:39:51 -04:00
parent 5515355367
commit 07899435b8
1 changed files with 26 additions and 13 deletions

View File

@ -31,6 +31,8 @@
#include "hb-font.hh"
#include "hb-machinery.hh"
#include "hb-ot.h"
/*
* hb_font_funcs_t
@ -1304,18 +1306,8 @@ DEFINE_NULL_INSTANCE (hb_font_t) =
};
/**
* hb_font_create: (Xconstructor)
* @face: a face.
*
*
*
* Return value: (transfer full):
*
* Since: 0.9.2
**/
hb_font_t *
hb_font_create (hb_face_t *face)
static hb_font_t *
_hb_font_create (hb_face_t *face)
{
hb_font_t *font;
@ -1334,6 +1326,27 @@ hb_font_create (hb_face_t *face)
return font;
}
/**
* hb_font_create: (Xconstructor)
* @face: a face.
*
*
*
* Return value: (transfer full):
*
* Since: 0.9.2
**/
hb_font_t *
hb_font_create (hb_face_t *face)
{
hb_font_t *font = _hb_font_create (face);
/* Install our in-house, very lightweight, funcs. */
hb_ot_font_set_funcs (font);
return font;
}
/**
* hb_font_create_sub_font:
* @parent: parent font.
@ -1350,7 +1363,7 @@ hb_font_create_sub_font (hb_font_t *parent)
if (unlikely (!parent))
parent = hb_font_get_empty ();
hb_font_t *font = hb_font_create (parent->face);
hb_font_t *font = _hb_font_create (parent->face);
if (unlikely (hb_object_is_inert (font)))
return font;