Aric Stewart : usp10: MarkToMark calculations may need to happen even if the offset is 0.
Alexandre Julliard
julliard at winehq.org
Fri Jan 18 12:07:38 CST 2013
Module: wine
Branch: master
Commit: 6b8c910b37aa9b7d6f798157d8e2435d25c0079e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b8c910b37aa9b7d6f798157d8e2435d25c0079e
Author: Aric Stewart <aric at codeweavers.com>
Date: Fri Jan 18 07:13:20 2013 -0600
usp10: MarkToMark calculations may need to happen even if the offset is 0.
---
dlls/usp10/opentype.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c
index 3bec2d3..ca4050c 100644
--- a/dlls/usp10/opentype.c
+++ b/dlls/usp10/opentype.c
@@ -1548,10 +1548,11 @@ static VOID GPOS_apply_MarkToLigature(const OT_LookupTable *look, const SCRIPT_A
}
}
-static VOID GPOS_apply_MarkToMark(const OT_LookupTable *look, const SCRIPT_ANALYSIS *analysis, const WORD *glyphs, INT glyph_index,
+static BOOL GPOS_apply_MarkToMark(const OT_LookupTable *look, const SCRIPT_ANALYSIS *analysis, const WORD *glyphs, INT glyph_index,
INT glyph_count, INT ppem, LPPOINT pt)
{
int j;
+ BOOL rc = FALSE;
int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1;
TRACE("MarkToMark Attachment Positioning Subtable\n");
@@ -1589,7 +1590,7 @@ static VOID GPOS_apply_MarkToMark(const OT_LookupTable *look, const SCRIPT_ANALY
if (mark_index > GET_BE_WORD(ma->MarkCount))
{
ERR("Mark index exeeded mark count\n");
- return;
+ return FALSE;
}
mr = &ma->MarkRecord[mark_index];
mark_class = GET_BE_WORD(mr->Class);
@@ -1607,12 +1608,14 @@ static VOID GPOS_apply_MarkToMark(const OT_LookupTable *look, const SCRIPT_ANALY
pt->x += mark2_pt.x - mark_pt.x;
pt->y += mark2_pt.y - mark_pt.y;
TRACE("Resulting cumulative offset is %i,%i design units\n",pt->x,pt->y);
+ rc = TRUE;
}
}
}
else
FIXME("Unhandled Mark To Mark Format %i\n",GET_BE_WORD(mmpf1->PosFormat));
}
+ return rc;
}
static INT GPOS_apply_ChainContextPos(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, const SCRIPT_ANALYSIS *analysis, INT* piAdvance,
@@ -1832,8 +1835,7 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c
double devX, devY;
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);
- if (desU.x || desU.y)
+ if (GPOS_apply_MarkToMark(look, analysis, glyphs, glyph_index, glyph_count, ppem, &desU))
{
GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY);
if (analysis->fRTL && analysis->fLogicalOrder) devX *= -1;
More information about the wine-cvs
mailing list