Module: wine Branch: master Commit: 533d800d42a68ee66878266400c4167be6038dbd URL: http://source.winehq.org/git/wine.git/?a=commit;h=533d800d42a68ee66878266400...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Mar 5 13:44:59 2017 +0300
gdi32: Cleanup otmfsType bit mask from reserved bits.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/gdi32/freetype.c | 3 ++- dlls/gdi32/tests/font.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index a5147b5..49e8c2f 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -7914,7 +7914,8 @@ static BOOL get_outline_text_metrics(GdiFont *font) font->potm->otmfsSelection |= 1; if (font->fake_bold) font->potm->otmfsSelection |= 1 << 5; - font->potm->otmfsType = pOS2->fsType; + /* Only return valid bits that define embedding and subsetting restrictions */ + font->potm->otmfsType = pOS2->fsType & 0x30e; font->potm->otmsCharSlopeRise = pHori->caret_Slope_Rise; font->potm->otmsCharSlopeRun = pHori->caret_Slope_Run; font->potm->otmItalicAngle = 0; /* POST table */ diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 834078e..7c80779 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -5676,7 +5676,6 @@ static void test_fstype_fixup(void)
/* Test font has fsType set to 0x7fff, test that reserved bits are filtered out, valid bits are 1, 2, 3, 8, 9. */ -todo_wine ok((otm->otmfsType & ~0x30e) == 0, "fsType %#x\n", otm->otmfsType);
HeapFree(GetProcessHeap(), 0, otm);