[subset] Add hb_subset_context_t<>
This commit is contained in:
parent
aba0a945c5
commit
d1f29908c2
|
@ -33,6 +33,7 @@
|
|||
#include "hb-blob.hh"
|
||||
#include "hb-face.hh"
|
||||
#include "hb-machinery.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
|
||||
namespace OT {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "hb-open-type.hh"
|
||||
#include "hb-set.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
/*
|
||||
* cmap -- Character to Glyph Index Mapping
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define HB_OT_HDMX_TABLE_HH
|
||||
|
||||
#include "hb-open-type.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
/*
|
||||
* hdmx -- Horizontal Device Metrics
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "hb-ot-hhea-table.hh"
|
||||
#include "hb-ot-os2-table.hh"
|
||||
#include "hb-ot-var-hvar-table.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
/*
|
||||
* hmtx -- Horizontal Metrics
|
||||
|
|
|
@ -1308,6 +1308,15 @@ struct GSUB : GSUBGPOS
|
|||
inline const SubstLookup& get_lookup (unsigned int i) const
|
||||
{ return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
|
||||
|
||||
template <typename Serializer>
|
||||
inline bool subset (hb_subset_context_t<Serializer> *c)
|
||||
{
|
||||
TRACE_SUBSET (this);
|
||||
//XXX if (unlikely (!GSUBGPOS::subset (c))) return_trace (false);
|
||||
return_trace (true);
|
||||
}
|
||||
|
||||
|
||||
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define HB_OT_MAXP_TABLE_HH
|
||||
|
||||
#include "hb-open-type.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
namespace OT {
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "hb-open-type.hh"
|
||||
#include "hb-ot-os2-unicode-ranges.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
namespace OT {
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define HB_OT_POST_TABLE_HH
|
||||
|
||||
#include "hb-open-type.hh"
|
||||
#include "hb-subset.hh"
|
||||
|
||||
#define HB_STRING_ARRAY_NAME format1_names
|
||||
#define HB_STRING_ARRAY_LIST "hb-ot-post-macroman.hh"
|
||||
|
|
|
@ -32,9 +32,30 @@
|
|||
|
||||
#include "hb-subset.h"
|
||||
|
||||
#include "hb-machinery.hh"
|
||||
#include "hb-subset-input.hh"
|
||||
#include "hb-subset-plan.hh"
|
||||
|
||||
template <typename Serializer>
|
||||
struct hb_subset_context_t :
|
||||
hb_dispatch_context_t<hb_subset_context_t<Serializer>, bool, HB_DEBUG_SUBSET>
|
||||
{
|
||||
inline const char *get_name (void) { return "SUBSET"; }
|
||||
template <typename T>
|
||||
inline bool dispatch (const T &obj) { return obj.subset (this); }
|
||||
static bool default_return_value (void) { return true; }
|
||||
bool stop_sublookup_iteration (bool r) const { return false; }
|
||||
|
||||
hb_subset_plan_t *plan;
|
||||
Serializer *serializer;
|
||||
unsigned int debug_depth;
|
||||
|
||||
hb_subset_context_t (hb_subset_plan_t *plan_,
|
||||
Serializer *serializer_) :
|
||||
plan (plan_),
|
||||
serializer (serializer_),
|
||||
debug_depth (0) {}
|
||||
};
|
||||
|
||||
|
||||
#endif /* HB_SUBSET_HH */
|
||||
|
|
Loading…
Reference in New Issue