Nikolay Sivov : dwrite: Set font stretch from 'head' table as a fallback.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 12 09:17:54 CDT 2015
Module: wine
Branch: master
Commit: 123c7cde07c73f01e576f2ab4dd01cdc8968047a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=123c7cde07c73f01e576f2ab4dd01cdc8968047a
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Aug 10 13:50:25 2015 +0300
dwrite: Set font stretch from 'head' table as a fallback.
---
dlls/dwrite/opentype.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index 852ad96..57660a3 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -133,8 +133,13 @@ typedef struct
enum TT_HEAD_MACSTYLE
{
- TT_HEAD_MACSTYLE_BOLD = 1 << 0,
- TT_HEAD_MACSTYLE_ITALIC = 1 << 1,
+ TT_HEAD_MACSTYLE_BOLD = 1 << 0,
+ TT_HEAD_MACSTYLE_ITALIC = 1 << 1,
+ TT_HEAD_MACSTYLE_UNDERLINE = 1 << 2,
+ TT_HEAD_MACSTYLE_OUTLINE = 1 << 3,
+ TT_HEAD_MACSTYLE_SHADOW = 1 << 4,
+ TT_HEAD_MACSTYLE_CONDENSED = 1 << 5,
+ TT_HEAD_MACSTYLE_EXTENDED = 1 << 6,
};
typedef struct
@@ -1051,6 +1056,11 @@ void opentype_get_font_properties(IDWriteFontFileStream *stream, DWRITE_FONT_FAC
USHORT macStyle = GET_BE_WORD(tt_head->macStyle);
if (macStyle & TT_HEAD_MACSTYLE_ITALIC)
props->style = DWRITE_FONT_STYLE_ITALIC;
+
+ if (macStyle & TT_HEAD_MACSTYLE_CONDENSED)
+ props->stretch = DWRITE_FONT_STRETCH_CONDENSED;
+ else if (macStyle & TT_HEAD_MACSTYLE_EXTENDED)
+ props->stretch = DWRITE_FONT_STRETCH_EXPANDED;
}
TRACE("stretch=%d, weight=%d, style %d\n", props->stretch, props->weight, props->style);
More information about the wine-cvs
mailing list