Module: wine Branch: master Commit: f5ab208ce81a177e50607064c0b2acf0432fae32 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5ab208ce81a177e50607064c0...
Author: Huw Davies huw@codeweavers.com Date: Fri Jan 11 11:09:20 2013 +0000
usp10: Handle an offset of the first glyph.
---
dlls/usp10/usp10.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index b77c251..850c486 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3275,12 +3275,20 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN lpDx[i * 2] = piAdvance[i]; lpDx[i * 2 + 1] = 0;
- if (pGoffset && i > 0) + if (pGoffset) { - lpDx[(i - 1) * 2] += pGoffset[i].du; - lpDx[(i - 1) * 2 + 1] += pGoffset[i].dv; - lpDx[i * 2] -= pGoffset[i].du; - lpDx[i * 2 + 1] -= pGoffset[i].dv; + if (i == 0) + { + x += pGoffset[i].du; + y += pGoffset[i].dv; + } + else + { + lpDx[(i - 1) * 2] += pGoffset[i].du; + lpDx[(i - 1) * 2 + 1] += pGoffset[i].dv; + } + lpDx[i * 2] -= pGoffset[i].du; + lpDx[i * 2 + 1] -= pGoffset[i].dv; } }