gstring->glyphs[from + i].GlyphClass = 0;
}
gstring->glyphs[from + i].glyph_id = ids[i];
- gstring->glyphs[from + i].positioning_type = 0;
+ gstring->glyphs[from + i].positioning_type = 1;
gstring->glyphs[from + i].f.index.from = from_idx;
gstring->glyphs[from + i].f.index.to = to_idx;
}
g->glyph_id += subtable->u.single1.DeltaGlyphID;
else
g->glyph_id = subtable->u.single2.Substitute[coverage_idx];
+ g->positioning_type = 1;
gidx++;
break;
if (j < reverse->LookaheadGlyphCount)
continue;
g->glyph_id = reverse->Substitute[coverage_idx];
+ g->positioning_type = 1;
gidx--;
}
switch (lookup_type)
{
case 1:
- positioning_type = lookup_type;
if (subtable->Format == 1)
{
OTF_GPOS_Single1 *single1 = &subtable->u.single1;
format = single2->ValueFormat;
value = single2->Value + coverage_idx;
}
- if (accumulate && g->positioning_type)
+ if (accumulate && (g->positioning_type & 0xF))
{
gidx = gstring_insert_for_gpos (gstring, gidx);
g = gstring->glyphs + gidx;
}
g->positioning_type
- = (g->positioning_type & 0xFFFFFFF0) | positioning_type;
+ = (g->positioning_type & 0xFFFFFFF0) | lookup_type;
g->f.f1.format = format;
g->f.f1.value = value;
if (debug_flag)
OTF_GPOS_Cursive1 *cursive1 = &subtable->u.cursive1;
g->positioning_type
- = (g->positioning_type & 0xFFFFFFF0) | lookup_type;
+ = (g->positioning_type & 0xFFFFFFF0) | lookup_type;
g->f.f3.entry_anchor
= &cursive1->EntryExitRecord[coverage_idx].EntryAnchor;
g->f.f3.exit_anchor
return errret;
if (gidx < result)
{
- if (with_log)
- for (j = gidx; j < result; j++)
- gstring->glyphs[j].positioning_type
- = ((gstring->glyphs[j].positioning_type & 0xF)
- | (lookup_flags[i] << 4));
+ for (j = gidx; j < result; j++)
+ gstring->glyphs[j].positioning_type
+ = with_log ? (lookup_flags[i] << 4) : 0;
gidx = result;
}
else
return errret;
if (gidx > result)
{
- if (with_log)
- for (j = gidx; j > result; j--)
- gstring->glyphs[j].positioning_type
- = ((gstring->glyphs[j].positioning_type & 0xF)
- | (lookup_flags[i] << 4));
+ for (j = gidx; j > result; j--)
+ gstring->glyphs[j].positioning_type
+ = with_log ? (lookup_flags[i] << 4) : 0;
gidx = result;
}
else
return errret;
if (gidx < result)
{
- if (with_log)
- for (j = gidx; j < result; j++)
- gstring->glyphs[j].positioning_type
- = ((gstring->glyphs[j].positioning_type & 0xF)
- | (lookup_flags[i] << 4));
+ for (j = gidx; j < result; j++)
+ {
+ int positioning_type
+ = gstring->glyphs[j].positioning_type & 0xF;
+
+ if (with_log && positioning_type)
+ gstring->glyphs[j].positioning_type
+ = positioning_type | (lookup_flags[i] << 4);
+ }
gidx = result;
}
else