mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[morx] Use hb_bit_set_t instead of hb_set_t directly
This commit is contained in:
1 parent
7b9277486f
commit
d40c079fed
3 files changed
+14
-13
No files matched your search
@@ -31,6 +31,7 @@
|
||||
#include "hb-aat-map.hh"
|
||||
#include "hb-open-type.hh"
|
||||
#include "hb-cache.hh"
|
||||
#include "hb-bit-set.hh"
|
||||
#include "hb-bit-page.hh"
|
||||
|
||||
|
||||
@@ -65,10 +66,10 @@ struct hb_aat_apply_context_t :
|
||||
const ankr *ankr_table;
|
||||
const OT::GDEF *gdef_table;
|
||||
const hb_sorted_vector_t<hb_aat_map_t::range_flags_t> *range_flags = nullptr;
|
||||
hb_set_t buffer_glyph_set;
|
||||
hb_bit_set_t buffer_glyph_set;
|
||||
const hb_set_t *left_set = nullptr;
|
||||
const hb_set_t *right_set = nullptr;
|
||||
const hb_set_t *machine_glyph_set = nullptr;
|
||||
const hb_bit_set_t *machine_glyph_set = nullptr;
|
||||
hb_aat_class_cache_t *machine_class_cache = nullptr;
|
||||
hb_mask_t subtable_flags = 0;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ struct RearrangementSubtable
|
||||
|
||||
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
|
||||
|
||||
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
|
||||
if (!c->buffer_glyph_set.intersects (*c->machine_glyph_set))
|
||||
{
|
||||
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
|
||||
return_trace (false);
|
||||
@@ -347,7 +347,7 @@ struct ContextualSubtable
|
||||
|
||||
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
|
||||
|
||||
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
|
||||
if (!c->buffer_glyph_set.intersects (*c->machine_glyph_set))
|
||||
{
|
||||
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
|
||||
return_trace (false);
|
||||
@@ -623,7 +623,7 @@ struct LigatureSubtable
|
||||
|
||||
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
|
||||
|
||||
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
|
||||
if (!c->buffer_glyph_set.intersects (*c->machine_glyph_set))
|
||||
{
|
||||
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
|
||||
return_trace (false);
|
||||
@@ -664,7 +664,7 @@ struct NoncontextualSubtable
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
|
||||
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
|
||||
if (!c->buffer_glyph_set.intersects (*c->machine_glyph_set))
|
||||
return_trace (false);
|
||||
|
||||
const OT::GDEF &gdef (*c->gdef_table);
|
||||
@@ -917,7 +917,7 @@ struct InsertionSubtable
|
||||
|
||||
StateTableDriver<Types, EntryData, Flags> driver (machine, c->face);
|
||||
|
||||
if (!c->buffer_glyph_set.may_intersect (*c->machine_glyph_set))
|
||||
if (!c->buffer_glyph_set.intersects (*c->machine_glyph_set))
|
||||
{
|
||||
(void) c->buffer->message (c->font, "skipped chainsubtable because no glyph matches");
|
||||
return_trace (false);
|
||||
@@ -979,7 +979,7 @@ struct hb_accelerate_subtables_context_t :
|
||||
friend struct hb_aat_layout_lookup_accelerator_t;
|
||||
|
||||
public:
|
||||
hb_set_t glyph_set;
|
||||
hb_bit_set_t glyph_set;
|
||||
mutable hb_aat_class_cache_t class_cache;
|
||||
|
||||
template <typename T>
|
||||
@@ -1221,7 +1221,7 @@ struct Chain
|
||||
hb_map ([subtable_flags] (const hb_aat_map_t::range_flags_t _) -> bool { return subtable_flags & (_.flags); })))
|
||||
goto skip;
|
||||
c->subtable_flags = subtable_flags;
|
||||
c->machine_glyph_set = accel ? &accel->subtables[i].glyph_set : &Null(hb_set_t);
|
||||
c->machine_glyph_set = accel ? &accel->subtables[i].glyph_set : &Null(hb_bit_set_t);
|
||||
c->machine_class_cache = accel ? &accel->subtables[i].class_cache : nullptr;
|
||||
|
||||
if (!(coverage & ChainSubtable<Types>::AllDirections) &&
|
||||
@@ -1452,7 +1452,7 @@ struct mortmorx
|
||||
|
||||
c->buffer->unsafe_to_concat ();
|
||||
|
||||
c->buffer_glyph_set = c->buffer->set ();
|
||||
c->buffer_glyph_set = c->buffer->bit_set ();
|
||||
|
||||
c->set_lookup_index (0);
|
||||
const Chain<Types> *chain = &firstChain;
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "hb.hh"
|
||||
#include "hb-unicode.hh"
|
||||
#include "hb-set.hh"
|
||||
#include "hb-bit-set.hh"
|
||||
#include "hb-set-digest.hh"
|
||||
|
||||
|
||||
@@ -198,9 +198,9 @@ struct hb_buffer_t
|
||||
d.add_array (&info[0].codepoint, len, sizeof (info[0]));
|
||||
return d;
|
||||
}
|
||||
hb_set_t set () const
|
||||
hb_bit_set_t bit_set () const
|
||||
{
|
||||
hb_set_t d;
|
||||
hb_bit_set_t d;
|
||||
d.add_array (&info[0].codepoint, len, sizeof (info[0]));
|
||||
return d;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user