Minor fixups

This commit is contained in:
Behdad Esfahbod 2018-02-08 17:35:57 -06:00
parent 35eeb893ef
commit 9682ef135f
6 changed files with 12 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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<typename TableType>
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<TableType> 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<TableType>::lock_instance (table_blob);
hb_bool_t result = table->subset(plan, source, dest);
hb_blob_destroy (table_blob);
// TODO string not numeric tag

View File

@ -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)

View File

@ -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)

View File

@ -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 */