Commit bbe66552 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Support outlines with oblique simulation.

parent b4e26148
......@@ -149,7 +149,7 @@ extern void release_freetype(void) DECLSPEC_HIDDEN;
extern HRESULT freetype_get_design_glyph_metrics(IDWriteFontFace2*,UINT16,UINT16,DWRITE_GLYPH_METRICS*) DECLSPEC_HIDDEN;
extern void freetype_notify_cacheremove(IDWriteFontFace2*) DECLSPEC_HIDDEN;
extern BOOL freetype_is_monospaced(IDWriteFontFace2*) DECLSPEC_HIDDEN;
extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,struct glyph_outline**) DECLSPEC_HIDDEN;
extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,USHORT,struct glyph_outline**) DECLSPEC_HIDDEN;
/* Glyph shaping */
enum SCRIPT_JUSTIFY
......
......@@ -515,7 +515,7 @@ static HRESULT WINAPI dwritefontface_GetGlyphRunOutline(IDWriteFontFace2 *iface,
/* FIXME: cache outlines */
hr = freetype_get_glyph_outline(iface, emSize, glyphs[g], &outline);
hr = freetype_get_glyph_outline(iface, emSize, glyphs[g], This->simulations, &outline);
if (FAILED(hr))
return hr;
......
......@@ -339,7 +339,7 @@ static HRESULT get_outline_data(const FT_Outline *outline, struct glyph_outline
return S_OK;
}
HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, struct glyph_outline **ret)
HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, USHORT simulations, struct glyph_outline **ret)
{
FTC_ScalerRec scaler;
HRESULT hr = S_OK;
......@@ -358,10 +358,10 @@ HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UIN
FT_Outline *outline = &size->face->glyph->outline;
FT_Matrix m;
m.xx = 1.0 * 0x10000;
m.xy = 0;
m.xx = 1 << 16;
m.xy = simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE ? (1 << 16) / 3 : 0;
m.yx = 0;
m.yy = -1.0 * 0x10000; /* flip Y axis */
m.yy = -(1 << 16); /* flip Y axis */
pFT_Outline_Transform(outline, &m);
......@@ -400,7 +400,7 @@ BOOL freetype_is_monospaced(IDWriteFontFace2 *fontface)
return FALSE;
}
HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, struct glyph_outline **ret)
HRESULT freetype_get_glyph_outline(IDWriteFontFace2 *fontface, FLOAT emSize, UINT16 index, USHORT simulations, struct glyph_outline **ret)
{
*ret = NULL;
return E_NOTIMPL;
......
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