diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh index efc12a822..c45258b2e 100644 --- a/src/hb-font-private.hh +++ b/src/hb-font-private.hh @@ -61,17 +61,6 @@ struct hb_font_funcs_t { hb_bool_t immutable; - /* Don't access these directly. Call font->get_*() instead. */ - - union get_t { - struct get_funcs_t { -#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name; - HB_FONT_FUNCS_IMPLEMENT_CALLBACKS -#undef HB_FONT_FUNC_IMPLEMENT - } f; - void (*array[]) (void); - } get; - struct { #define HB_FONT_FUNC_IMPLEMENT(name) void *name; HB_FONT_FUNCS_IMPLEMENT_CALLBACKS @@ -83,6 +72,16 @@ struct hb_font_funcs_t { HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } destroy; + + /* Don't access these directly. Call font->get_*() instead. */ + union get_t { + struct get_funcs_t { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } f; + void (*array[]) (void); + } get; }; diff --git a/src/hb-font.cc b/src/hb-font.cc index 33c644bc9..170dd5572 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -286,6 +286,16 @@ static const hb_font_funcs_t _hb_font_funcs_nil = { true, /* immutable */ + { +#define HB_FONT_FUNC_IMPLEMENT(name) NULL, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + }, + { +#define HB_FONT_FUNC_IMPLEMENT(name) NULL, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + }, { #define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil, HB_FONT_FUNCS_IMPLEMENT_CALLBACKS @@ -297,6 +307,16 @@ static const hb_font_funcs_t _hb_font_funcs_parent = { true, /* immutable */ + { +#define HB_FONT_FUNC_IMPLEMENT(name) NULL, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + }, + { +#define HB_FONT_FUNC_IMPLEMENT(name) NULL, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + }, { #define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_parent, HB_FONT_FUNCS_IMPLEMENT_CALLBACKS