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.
This commit is contained in:
parent
7f411dbfd9
commit
009aad5678
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue