Commit 123c7cde authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Set font stretch from 'head' table as a fallback.

parent 4b4674be
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment