Module: wine Branch: master Commit: e5ab22d684e1d17c0ab1a2a757404379ab633ac8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e5ab22d684e1d17c0ab1a2a757...
Author: Aric Stewart aric@codeweavers.com Date: Tue Jan 15 07:09:29 2013 -0600
ups10: Mark to Base, Mark and Ligature are not cumulative offsets.
---
dlls/usp10/opentype.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 05b8cab..e729919 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1734,10 +1734,13 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c if (desU.x || desU.y) { 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]; - else if (analysis->fLogicalOrder) devX *= -1; - pGoffset[glyph_index].du += round(devX); - pGoffset[glyph_index].dv += round(devY); + if (!analysis->fRTL) pGoffset[glyph_index].du = round(devX) - piAdvance[glyph_index-1]; + else + { + if (analysis->fLogicalOrder) devX *= -1; + pGoffset[glyph_index].du = round(devX); + } + pGoffset[glyph_index].dv = round(devY); } break; } @@ -1749,8 +1752,8 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c if (desU.x || desU.y) { 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].dv += round(devY); + pGoffset[glyph_index].du = (round(devX) - piAdvance[glyph_index-1]); + pGoffset[glyph_index].dv = round(devY); } 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); if (analysis->fRTL && analysis->fLogicalOrder) devX *= -1; - 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].du = round(devX) + pGoffset[glyph_index - write_dir].du; + pGoffset[glyph_index].dv = round(devY) + pGoffset[glyph_index - write_dir].dv; } break; }