diff --git a/CMakeLists.txt b/CMakeLists.txt index 27a04b1fddc270cf31684d187f2e2131127c69d4..c21a42918f7906b9c07210b4cabfa665932e464a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,7 +253,7 @@ set (project_sources ${HB_FALLBACK_sources} ${HB_OT_sources} - ${HB_OT_RAGEL_GENERATED_sources} + ${HB_OT_RAGEL_GENERATED_sources} ) set (subset_project_sources diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 219eca7b2454742e1d65311f7685d21d0eff4d24..537336806c3bf2b97e868b1c88342b892315932c 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -27,7 +27,7 @@ #ifndef HB_OT_CMAP_TABLE_HH #define HB_OT_CMAP_TABLE_HH -#include "hb-open-type-private.hh" +#include "hb-open-type-private.hh" #include "hb-subset-plan.hh" namespace OT { @@ -504,7 +504,7 @@ struct cmap encodingRecord.sanitize (c, this)); } - inline bool subset(hb_subset_plan_t *plan, hb_face_t *source, hb_face_t *dest) const + inline bool subset (hb_subset_plan_t *plan, hb_face_t *source, hb_face_t *dest) const { // TODO something useful re: memory, write to dest size_t dest_sz = 64536; // as much as anyone would ever need @@ -514,7 +514,7 @@ struct cmap // Same version OT::cmap new_cmap; new_cmap.version = version; - new_cmap.encodingRecord.len.set(1); // one format 12 subtable + new_cmap.encodingRecord.len.set(1); // one format 12 subtable // TODO we need to actually build the format 12 subtable diff --git a/src/hb-subset.cc b/src/hb-subset.cc index f10f35ba4c70939e9cf48ed8c79caec2b1fefce4..a46cbd08fdaba9b8fe5140981699d68e6bf41a16 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -26,7 +26,7 @@ */ #include "hb-object-private.hh" -#include "hb-open-type-private.hh" +#include "hb-open-type-private.hh" #include "hb-private.hh" @@ -109,7 +109,7 @@ hb_subset_input_destroy(hb_subset_input_t *subset_input) template hb_bool_t -subset(hb_subset_plan_t *plan, hb_face_t *source, hb_face_t *dest) +subset (hb_subset_plan_t *plan, hb_face_t *source, hb_face_t *dest) { OT::Sanitizer sanitizer; hb_blob_t *table_blob = sanitizer.sanitize (source->reference_table (TableType::tableTag)); @@ -119,7 +119,7 @@ subset(hb_subset_plan_t *plan, hb_face_t *source, hb_face_t *dest) } const TableType *table = OT::Sanitizer::lock_instance (table_blob); hb_bool_t result = table->subset(plan, source, dest); - + hb_blob_destroy (table_blob); // TODO string not numeric tag diff --git a/test/api/hb-test.h b/test/api/hb-test.h index 040f0c2170785592b3dcac44421a854feccfab3f..f6f107e28364731482adeb97ac844fba57e988b9 100644 --- a/test/api/hb-test.h +++ b/test/api/hb-test.h @@ -161,6 +161,11 @@ typedef void (*hb_test_fixture_func_t) (void); #define g_test_fail() g_error("Test failed") #endif +#ifndef g_assert_cmpmem +#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0) +#endif + + static inline void hb_test_add_func (const char *test_path, hb_test_func_t test_func) diff --git a/test/api/test-subset-glyf.c b/test/api/test-subset-glyf.c index b7d5690240e405a269d0e3b0b4a23cae47d9a968..196047fe689921023a24e39c6f8854f5d7746fd8 100644 --- a/test/api/test-subset-glyf.c +++ b/test/api/test-subset-glyf.c @@ -28,10 +28,6 @@ #include "hb-test.h" -#ifndef g_assert_cmpmem -#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0) -#endif - static char * read_file (const char *path, size_t *length) diff --git a/test/api/test-subset.c b/test/api/test-subset.c index 866a8333cebda6852437c1cd49484a877bcc2051..4184a563f91d18ff152518163aadb1e652d89dcc 100644 --- a/test/api/test-subset.c +++ b/test/api/test-subset.c @@ -26,10 +26,6 @@ #include "hb-test.h" -#ifndef g_assert_cmpmem -#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0) -#endif - /* Unit tests for hb-subset.h */ static const char test_data[] = { 0, 1, 0, 0, /* sfntVersion */