From 64e182e4296574c9f6b08e1339c1abe8e40c7db0 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Sat, 27 Jul 2019 10:00:42 +0200 Subject: [PATCH] [WIN32SS] Addendum to font alignment CORE-16133 addendum to 0.4.13-dev-707-g 0e4db883e5727569b5c3a35da3a6f8c5e921bbf3 Jim Tabor intended to structurally use flTextAlign over lTextAlign internally within IntExtTextOutW(). He initially committed these changes in 0.4.12-dev-805-g 3377fe184efa77e7c4971c2ac70ed33ab12f0724 But we unintentionally lost these changes via 0.4.13-dev-370-g 8f482af0a876d269cca64288f114eb1fe1180ef0 Many thanks to Doug Lyons who helped a lot with fixing CORE-16133. --- win32ss/gdi/ntgdi/freetype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 162df2a2708..3d94d788681 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -5794,7 +5794,7 @@ IntExtTextOutW( IntLPtoDP(dc, (POINT *)lprc, 2); } - if (pdcattr->lTextAlign & TA_UPDATECP) + if (pdcattr->flTextAlign & TA_UPDATECP) { Start.x = pdcattr->ptlCurrent.x; Start.y = pdcattr->ptlCurrent.y; @@ -5931,7 +5931,7 @@ IntExtTextOutW( * Process the horizontal alignment and modify XStart accordingly. */ DxShift = fuOptions & ETO_PDY ? 1 : 0; - if (pdcattr->lTextAlign & (TA_RIGHT | TA_CENTER)) + if (pdcattr->flTextAlign & (TA_RIGHT | TA_CENTER)) { ULONGLONG TextWidth = 0; LPCWSTR TempText = String; @@ -6017,7 +6017,7 @@ IntExtTextOutW( previous = 0; - if ((pdcattr->lTextAlign & TA_CENTER) == TA_CENTER) + if ((pdcattr->flTextAlign & TA_CENTER) == TA_CENTER) { RealXStart -= TextWidth / 2; } @@ -6417,7 +6417,7 @@ IntExtTextOutW( } } - if (pdcattr->lTextAlign & TA_UPDATECP) { + if (pdcattr->flTextAlign & TA_UPDATECP) { pdcattr->ptlCurrent.x = DestRect.right - dc->ptlDCOrig.x; }