Commit 3bb778a6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Pass simulation mask when getting a glyph outline.

parent ca08a5e7
......@@ -732,7 +732,8 @@ struct font_callback_funcs
struct font_backend_funcs
{
void (CDECL *notify_release)(void *key);
int (CDECL *get_glyph_outline)(void *key, float em_size, UINT16 glyph, struct dwrite_outline *outline);
int (CDECL *get_glyph_outline)(void *key, float em_size, unsigned int simulations, UINT16 glyph,
struct dwrite_outline *outline);
UINT16 (CDECL *get_glyph_count)(void *key);
INT32 (CDECL *get_glyph_advance)(void *key, float em_size, UINT16 index, DWRITE_MEASURING_MODE measuring_mode,
BOOL *has_contours);
......
......@@ -870,6 +870,7 @@ static HRESULT WINAPI dwritefontface_GetGlyphRunOutline(IDWriteFontFace5 *iface,
UINT16 const *glyphs, FLOAT const* advances, DWRITE_GLYPH_OFFSET const *offsets,
UINT32 count, BOOL is_sideways, BOOL is_rtl, IDWriteGeometrySink *sink)
{
struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface);
D2D1_POINT_2F *origins, baseline_origin = { 0 };
struct dwrite_outline outline = {{ 0 }};
D2D1_BEZIER_SEGMENT segment;
......@@ -910,7 +911,7 @@ static HRESULT WINAPI dwritefontface_GetGlyphRunOutline(IDWriteFontFace5 *iface,
for (i = 0; i < count; ++i)
{
outline.tags.count = outline.points.count = 0;
if (font_funcs->get_glyph_outline(iface, emSize, glyphs[i], &outline))
if (font_funcs->get_glyph_outline(iface, emSize, fontface->simulations, glyphs[i], &outline))
{
WARN("Failed to get glyph outline for glyph %u.\n", glyphs[i]);
continue;
......
......@@ -436,17 +436,14 @@ static void embolden_glyph(FT_Glyph glyph, FLOAT emsize)
embolden_glyph_outline(&outline_glyph->outline, emsize);
}
static int CDECL freetype_get_glyph_outline(void *key, float emSize, UINT16 glyph, struct dwrite_outline *outline)
static int CDECL freetype_get_glyph_outline(void *key, float emSize, unsigned int simulations,
UINT16 glyph, struct dwrite_outline *outline)
{
IDWriteFontFace5 *fontface = key;
FTC_ScalerRec scaler;
USHORT simulations;
FT_Size size;
int ret;
simulations = IDWriteFontFace5_GetSimulations(fontface);
scaler.face_id = fontface;
scaler.face_id = key;
scaler.width = emSize;
scaler.height = emSize;
scaler.pixel = 1;
......@@ -779,7 +776,8 @@ static void CDECL null_notify_release(void *key)
{
}
static int CDECL null_get_glyph_outline(void *key, float emSize, UINT16 glyph, struct dwrite_outline *outline)
static int CDECL null_get_glyph_outline(void *key, float emSize, unsigned int simulations,
UINT16 glyph, struct dwrite_outline *outline)
{
return 1;
}
......
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