ups10: Mark to Base, Mark and Ligature are not cumulative offsets.

This commit is contained in:
Aric Stewart 2013-01-15 07:09:29 -06:00 committed by Alexandre Julliard
parent b6bc92aaa9
commit e5ab22d684

View File

@ -1734,10 +1734,13 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c
if (desU.x || desU.y) if (desU.x || desU.y)
{ {
GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY); GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY);
if (!analysis->fRTL) pGoffset[glyph_index].du -= piAdvance[glyph_index-1]; if (!analysis->fRTL) pGoffset[glyph_index].du = round(devX) - piAdvance[glyph_index-1];
else if (analysis->fLogicalOrder) devX *= -1; else
pGoffset[glyph_index].du += round(devX); {
pGoffset[glyph_index].dv += round(devY); if (analysis->fLogicalOrder) devX *= -1;
pGoffset[glyph_index].du = round(devX);
}
pGoffset[glyph_index].dv = round(devY);
} }
break; break;
} }
@ -1749,8 +1752,8 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c
if (desU.x || desU.y) if (desU.x || desU.y)
{ {
GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY); GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY);
pGoffset[glyph_index].du += (round(devX) - piAdvance[glyph_index-1]); pGoffset[glyph_index].du = (round(devX) - piAdvance[glyph_index-1]);
pGoffset[glyph_index].dv += round(devY); pGoffset[glyph_index].dv = round(devY);
} }
break; break;
} }
@ -1764,8 +1767,8 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c
{ {
GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY); GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY);
if (analysis->fRTL && analysis->fLogicalOrder) devX *= -1; if (analysis->fRTL && analysis->fLogicalOrder) devX *= -1;
pGoffset[glyph_index].du += round(devX) + pGoffset[glyph_index - write_dir].du; pGoffset[glyph_index].du = round(devX) + pGoffset[glyph_index - write_dir].du;
pGoffset[glyph_index].dv += round(devY) + pGoffset[glyph_index - write_dir].dv; pGoffset[glyph_index].dv = round(devY) + pGoffset[glyph_index - write_dir].dv;
} }
break; break;
} }