From 3a0b3a29cc246d0b1e5989c9e8c1e6d544046dcc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 26 Aug 2018 15:11:24 -0700 Subject: [PATCH] Free up hb-ot-face.hh from includes There might be a better way to do this, but I couldn't find... --- src/hb-face.cc | 1 + src/hb-ot-cmap-table.hh | 1 + src/hb-ot-color-cbdt-table.hh | 2 ++ src/hb-ot-face.cc | 10 ++++++++++ src/hb-ot-face.hh | 15 ++------------- src/hb-ot-font.cc | 7 +++++++ src/hb-ot-glyf-table.hh | 2 ++ src/hb-ot-hmtx-table.hh | 3 +++ src/hb-ot-kern-table.hh | 2 ++ src/hb-ot-layout-gdef-table.hh | 1 + src/hb-ot-layout-gpos-table.hh | 2 ++ src/hb-ot-layout-gsub-table.hh | 1 + src/hb-ot-post-table.hh | 2 ++ 13 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/hb-face.cc b/src/hb-face.cc index e4e0e05a4..ddf8e488d 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -32,6 +32,7 @@ #include "hb-blob.hh" #include "hb-open-file.hh" #include "hb-ot-face.hh" +#include "hb-ot-cmap-table.hh" /** diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index c357714e2..aca5de2e3 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1173,6 +1173,7 @@ struct cmap DEFINE_SIZE_ARRAY (4, encodingRecord); }; +struct cmap_accelerator_t : cmap::accelerator_t {}; } /* namespace OT */ diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh index 8533b0365..8bedf2224 100644 --- a/src/hb-ot-color-cbdt-table.hh +++ b/src/hb-ot-color-cbdt-table.hh @@ -533,6 +533,8 @@ struct CBDT DEFINE_SIZE_ARRAY(4, dataZ); }; +struct CBDT_accelerator_t : CBDT::accelerator_t {}; + } /* namespace OT */ #endif /* HB_OT_COLOR_CBDT_TABLE_HH */ diff --git a/src/hb-ot-face.cc b/src/hb-ot-face.cc index ffac3d062..c6c4ff9e6 100644 --- a/src/hb-ot-face.cc +++ b/src/hb-ot-face.cc @@ -26,6 +26,16 @@ #include "hb-ot-face.hh" +#include "hb-ot-cmap-table.hh" +#include "hb-ot-glyf-table.hh" +#include "hb-ot-hmtx-table.hh" +#include "hb-ot-kern-table.hh" +#include "hb-ot-post-table.hh" +#include "hb-ot-color-cbdt-table.hh" +#include "hb-ot-layout-gdef-table.hh" +#include "hb-ot-layout-gsub-table.hh" +#include "hb-ot-layout-gpos-table.hh" + void hb_ot_face_data_t::tables_t::init0 (hb_face_t *face) { diff --git a/src/hb-ot-face.hh b/src/hb-ot-face.hh index 6e7ff2ce2..765627dee 100644 --- a/src/hb-ot-face.hh +++ b/src/hb-ot-face.hh @@ -37,17 +37,6 @@ #define hb_ot_face_data(face) ((hb_ot_face_data_t *) face->shaper_data.ot.get_relaxed ()) -#include "hb-ot-cmap-table.hh" -#include "hb-ot-glyf-table.hh" -#include "hb-ot-hmtx-table.hh" -#include "hb-ot-kern-table.hh" -#include "hb-ot-post-table.hh" -#include "hb-ot-color-cbdt-table.hh" -#include "hb-ot-layout-gdef-table.hh" -#include "hb-ot-layout-gsub-table.hh" -#include "hb-ot-layout-gpos-table.hh" - - /* * hb_ot_face_data_t */ @@ -84,7 +73,7 @@ /* Declare tables. */ #define HB_OT_LAYOUT_TABLE(Namespace, Type) namespace Namespace { struct Type; } -#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) HB_OT_LAYOUT_TABLE (Namespace, Type) +#define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) HB_OT_LAYOUT_TABLE (Namespace, Type##_accelerator_t) HB_OT_LAYOUT_TABLES #undef HB_OT_LAYOUT_ACCELERATOR #undef HB_OT_LAYOUT_TABLE @@ -113,7 +102,7 @@ struct hb_ot_face_data_t #define HB_OT_LAYOUT_TABLE(Namespace, Type) \ hb_table_lazy_loader_t Type; #define HB_OT_LAYOUT_ACCELERATOR(Namespace, Type) \ - hb_face_lazy_loader_t Type; + hb_face_lazy_loader_t Type; HB_OT_LAYOUT_TABLES #undef HB_OT_LAYOUT_ACCELERATOR #undef HB_OT_LAYOUT_TABLE diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index c96cba41d..e441aad4c 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -32,6 +32,13 @@ #include "hb-machinery.hh" #include "hb-ot-face.hh" +#include "hb-ot-cmap-table.hh" +#include "hb-ot-hmtx-table.hh" +#include "hb-ot-kern-table.hh" +#include "hb-ot-post-table.hh" +#include "hb-ot-glyf-table.hh" +#include "hb-ot-color-cbdt-table.hh" + typedef hb_ot_face_data_t::tables_t hb_ot_font_t; diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index a23269e56..65758861a 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -490,6 +490,8 @@ struct glyf DEFINE_SIZE_ARRAY (0, dataZ); }; +struct glyf_accelerator_t : glyf::accelerator_t {}; + } /* namespace OT */ diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 6849172b9..9bdca7eb9 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -332,6 +332,9 @@ struct vmtx : hmtxvmtx { static const hb_tag_t os2Tag = HB_TAG_NONE; }; +struct hmtx_accelerator_t : hmtx::accelerator_t {}; +struct vmtx_accelerator_t : vmtx::accelerator_t {}; + } /* namespace OT */ diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index ac6e9e459..40f94be29 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -390,6 +390,8 @@ struct kern DEFINE_SIZE_UNION (2, major); }; +struct kern_accelerator_t : kern::accelerator_t {}; + } /* namespace OT */ diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh index 1f19c0284..79308649f 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -467,6 +467,7 @@ struct GDEF DEFINE_SIZE_MIN (12); }; +struct GDEF_accelerator_t : GDEF::accelerator_t {}; } /* namespace OT */ diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 08a99b35c..16b547939 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1647,6 +1647,8 @@ template return ret; } +struct GPOS_accelerator_t : GPOS::accelerator_t {}; + #undef attach_chain #undef attach_type diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 11fe7cf4c..55696c5ac 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1350,6 +1350,7 @@ template return ret; } +struct GSUB_accelerator_t : GSUB::accelerator_t {}; } /* namespace OT */ diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index 44918b1d6..0c3e596a3 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -295,6 +295,8 @@ struct post DEFINE_SIZE_STATIC (32); }; +struct post_accelerator_t : post::accelerator_t {}; + } /* namespace OT */