Skip to content

Commit 9dde283

Browse files
committed
[0.4.12][WIN32SS] Fix regression of font alignment CORE-16133
This fixes fonts not being displayed properly within an edit in Precise Calculator application. Jim Tabor intended to structurally use flTextAlign over lTextAlign internally within IntExtTextOutW(). He initially committed these changes in 0.4.12-dev-805-g 3377fe1 But we unintentionally lost these changes via 0.4.12-RC-26-g 486fd83 Many thanks to Doug Lyons who helped a lot with fixing CORE-16133. We also corrected this issue in master via 0.4.13-dev-707-g 0e4db88 and 0.4.13-dev-712-g 64e182e
1 parent ca0e00e commit 9dde283

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

win32ss/gdi/ntgdi/freetype.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5678,7 +5678,7 @@ IntExtTextOutW(
56785678
IntLPtoDP(dc, (POINT *)lprc, 2);
56795679
}
56805680

5681-
if (pdcattr->lTextAlign & TA_UPDATECP)
5681+
if (pdcattr->flTextAlign & TA_UPDATECP)
56825682
{
56835683
Start.x = pdcattr->ptlCurrent.x;
56845684
Start.y = pdcattr->ptlCurrent.y;
@@ -5800,9 +5800,9 @@ IntExtTextOutW(
58005800
* Process the vertical alignment and determine the yoff.
58015801
*/
58025802
#define VALIGN_MASK (TA_TOP | TA_BASELINE | TA_BOTTOM)
5803-
if ((pdcattr->lTextAlign & VALIGN_MASK) == TA_BASELINE)
5803+
if ((pdcattr->flTextAlign & VALIGN_MASK) == TA_BASELINE)
58045804
yoff = 0;
5805-
else if ((pdcattr->lTextAlign & VALIGN_MASK) == TA_BOTTOM)
5805+
else if ((pdcattr->flTextAlign & VALIGN_MASK) == TA_BOTTOM)
58065806
yoff = -(fixDescender >> 6);
58075807
else /* TA_TOP */
58085808
yoff = fixAscender >> 6;
@@ -5815,7 +5815,7 @@ IntExtTextOutW(
58155815
* Process the horizontal alignment and modify XStart accordingly.
58165816
*/
58175817
DxShift = fuOptions & ETO_PDY ? 1 : 0;
5818-
if (pdcattr->lTextAlign & (TA_RIGHT | TA_CENTER))
5818+
if (pdcattr->flTextAlign & (TA_RIGHT | TA_CENTER))
58195819
{
58205820
ULONGLONG TextWidth = 0;
58215821
LPCWSTR TempText = String;
@@ -5901,7 +5901,7 @@ IntExtTextOutW(
59015901

59025902
previous = 0;
59035903

5904-
if ((pdcattr->lTextAlign & TA_CENTER) == TA_CENTER)
5904+
if ((pdcattr->flTextAlign & TA_CENTER) == TA_CENTER)
59055905
{
59065906
RealXStart -= TextWidth / 2;
59075907
}
@@ -6301,7 +6301,7 @@ IntExtTextOutW(
63016301
}
63026302
}
63036303

6304-
if (pdcattr->lTextAlign & TA_UPDATECP) {
6304+
if (pdcattr->flTextAlign & TA_UPDATECP) {
63056305
pdcattr->ptlCurrent.x = DestRect.right - dc->ptlDCOrig.x;
63066306
}
63076307

0 commit comments

Comments
 (0)