Why does subset plan not have a hb_set_t of glyphs?
#include "hb-blob.hh"
#include "hb-iter.hh"
+#include "hb-vector.hh"
/*
template <typename Type>
struct Supplier
{
- inline Supplier (const Type *array, unsigned int len_, unsigned int stride_=sizeof(Type))
+ inline Supplier (const Type *array, unsigned int len_, unsigned int stride_=sizeof (Type))
{
head = array;
len = len_;
stride = stride_;
}
+ inline Supplier (const hb_vector_t<Type> *v)
+ {
+ head = v->arrayZ;
+ len = v->len;
+ stride = sizeof (Type);
+ }
+
inline const Type operator [] (unsigned int i) const
{
if (unlikely (i >= len)) return Type ();
inline bool subset (hb_subset_context_t *c) const
{
+ return false;
TRACE_SUBSET (this);
- // TODO(subset)
+ hb_auto_t<hb_vector_t<hb_codepoint_t>> from;
+ hb_auto_t<hb_vector_t<hb_codepoint_t>> to;
+ hb_codepoint_t delta = deltaGlyphID;
+ for (hb_auto_t<Coverage::Iter> iter (this+coverage); iter.more (); iter.next ())
+ {
+ //if (!c->plan->glyphs->has (iter.get_glyph ()))
+ // continue;
+ from.push (iter.get_glyph ());
+ to.push ((iter.get_glyph () + delta) & 0xFFFF);
+ }
return_trace (false);
}