Commit 6ae41d01 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

usp10: Fix MarkToMark offset for RTL text.

parent 464bf22f
...@@ -1758,12 +1758,14 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c ...@@ -1758,12 +1758,14 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c
{ {
double devX, devY; double devX, devY;
POINT desU = {0,0}; POINT desU = {0,0};
int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1;
GPOS_apply_MarkToMark(look, analysis, glyphs, glyph_index, glyph_count, ppem, &desU); GPOS_apply_MarkToMark(look, analysis, glyphs, glyph_index, glyph_count, ppem, &desU);
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) + pGoffset[glyph_index-1].du; if (analysis->fRTL && analysis->fLogicalOrder) devX *= -1;
pGoffset[glyph_index].dv += round(devY) + pGoffset[glyph_index-1].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; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment