Don't install ot-font funcs on new fonts if HB_NO_OT_FONT defined

Currently linker cannot GC hb-ot-font completely because we install
it on fonts by default.  Don't do that if HB_NO_OT_FONT defined.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
Behdad Esfahbod 2019-04-10 15:40:03 -04:00
parent b111b3de02
commit 4d31662b5d
1 changed files with 2 additions and 0 deletions

View File

@ -1347,8 +1347,10 @@ hb_font_create (hb_face_t *face)
{
hb_font_t *font = _hb_font_create (face);
#if !defined(HB_NO_OT_FONT)
/* Install our in-house, very lightweight, funcs. */
hb_ot_font_set_funcs (font);
#endif
return font;
}