mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 00:32:59 +00:00
Revert "[aat] Remove buffer-digest stuff"
This reverts commit 7642366593
.
This commit is contained in:
parent
7d23e642a2
commit
359d163d25
3 changed files with 16 additions and 0 deletions
|
@ -65,6 +65,7 @@ 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_digest_t buffer_digest = hb_set_digest_t::full ();
|
||||
const hb_set_t *left_set = nullptr;
|
||||
const hb_set_t *right_set = nullptr;
|
||||
hb_aat_class_cache_t *machine_class_cache = nullptr;
|
||||
|
|
|
@ -967,6 +967,11 @@ struct KerxTable
|
|||
{
|
||||
c->buffer->unsafe_to_concat ();
|
||||
|
||||
if (c->buffer->len < HB_AAT_BUFFER_DIGEST_THRESHOLD)
|
||||
c->buffer_digest = c->buffer->digest ();
|
||||
else
|
||||
c->buffer_digest = hb_set_digest_t::full ();
|
||||
|
||||
typedef typename T::SubTable SubTable;
|
||||
|
||||
bool ret = false;
|
||||
|
|
|
@ -268,6 +268,7 @@ struct ContextualSubtable
|
|||
{
|
||||
buffer->unsafe_to_break (mark, hb_min (buffer->idx + 1, buffer->len));
|
||||
buffer->info[mark].codepoint = *replacement;
|
||||
c->buffer_digest.add (*replacement);
|
||||
if (has_glyph_classes)
|
||||
_hb_glyph_info_set_glyph_props (&buffer->info[mark],
|
||||
gdef.get_glyph_props (*replacement));
|
||||
|
@ -297,6 +298,7 @@ struct ContextualSubtable
|
|||
if (replacement)
|
||||
{
|
||||
buffer->info[idx].codepoint = *replacement;
|
||||
c->buffer_digest.add (*replacement);
|
||||
if (has_glyph_classes)
|
||||
_hb_glyph_info_set_glyph_props (&buffer->info[idx],
|
||||
gdef.get_glyph_props (*replacement));
|
||||
|
@ -657,6 +659,7 @@ struct NoncontextualSubtable
|
|||
if (replacement)
|
||||
{
|
||||
info[i].codepoint = *replacement;
|
||||
c->buffer_digest.add (*replacement);
|
||||
if (has_glyph_classes)
|
||||
_hb_glyph_info_set_glyph_props (&info[i],
|
||||
gdef.get_glyph_props (*replacement));
|
||||
|
@ -791,6 +794,8 @@ struct InsertionSubtable
|
|||
if (unlikely (!buffer->copy_glyph ())) return;
|
||||
/* TODO We ignore KashidaLike setting. */
|
||||
if (unlikely (!buffer->replace_glyphs (0, count, glyphs))) return;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
c->buffer_digest.add (glyphs[i]);
|
||||
ret = true;
|
||||
if (buffer->idx < buffer->len && !before)
|
||||
buffer->skip_glyph ();
|
||||
|
@ -1368,6 +1373,11 @@ struct mortmorx
|
|||
|
||||
c->buffer->unsafe_to_concat ();
|
||||
|
||||
if (c->buffer->len < HB_AAT_BUFFER_DIGEST_THRESHOLD)
|
||||
c->buffer_digest = c->buffer->digest ();
|
||||
else
|
||||
c->buffer_digest = hb_set_digest_t::full ();
|
||||
|
||||
c->set_lookup_index (0);
|
||||
const Chain<Types> *chain = &firstChain;
|
||||
unsigned int count = chainCount;
|
||||
|
|
Loading…
Add table
Reference in a new issue