[HarfBuzz] harfbuzz-ng: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu May 20 06:02:29 PDT 2010
src/hb-buffer.cc | 2 +-
src/hb-ot-layout-gpos-private.hh | 2 +-
src/hb-ot-layout-gsub-private.hh | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 009aad567863c05ee2ec4a3ee76fe0ee79c767bb
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu May 20 14:00:57 2010 +0100
Invert the mask logic
Before, the mask in the buffer was inverted. That is, a 0 bit meant
feature should be applied and 1 meant not applied, whereas in the
lookups, the logic was positive.
Now both are in sync. When calling hb_buffer_add_glyph() manually,
the mask should be 1 instead of 0.
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index a384d1f..0b77919 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -551,7 +551,7 @@ hb_buffer_reverse_clusters (hb_buffer_t *buffer)
hb_codepoint_t u; \
const T *old_next = next; \
next = UTF_NEXT (next, end, u); \
- hb_buffer_add_glyph (buffer, u, 0, old_next - (const T *) text); \
+ hb_buffer_add_glyph (buffer, u, 1, old_next - (const T *) text); \
} \
} HB_STMT_END
diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh
index 81e18d4..cb66aec 100644
--- a/src/hb-ot-layout-gpos-private.hh
+++ b/src/hb-ot-layout-gpos-private.hh
@@ -1535,7 +1535,7 @@ struct PosLookup : Lookup
while (buffer->i < buffer->len)
{
bool done;
- if (~buffer->info[buffer->i].mask & mask)
+ if (buffer->info[buffer->i].mask & mask)
{
done = apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL);
ret |= done;
diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh
index 828c458..96c1c9c 100644
--- a/src/hb-ot-layout-gsub-private.hh
+++ b/src/hb-ot-layout-gsub-private.hh
@@ -830,7 +830,7 @@ struct SubstLookup : Lookup
buffer->i = 0;
while (buffer->i < buffer->len)
{
- if ((~buffer->info[buffer->i].mask & mask) &&
+ if ((buffer->info[buffer->i].mask & mask) &&
apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
ret = true;
else
@@ -846,7 +846,7 @@ struct SubstLookup : Lookup
buffer->i = buffer->len - 1;
do
{
- if ((~buffer->info[buffer->i].mask & mask) &&
+ if ((buffer->info[buffer->i].mask & mask) &&
apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
ret = true;
else
More information about the HarfBuzz
mailing list