From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dwrite/font.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 65bf7021938..0f1e57eb179 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -133,6 +133,8 @@ static int fontface_get_glyph_advance(struct dwrite_fontface *fontface, float fo struct cache_entry *entry; unsigned int value;
+ *has_contours = FALSE; + if (!(entry = fontface_get_cache_entry(fontface, 0, &key))) return 0;
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dwrite/layout.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 342f7e10886..03ab0bff31e 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3762,6 +3762,8 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout unsigned int i; HRESULT hr;
+ memset(bbox, 0, sizeof(*bbox)); + if (run->bbox.top == run->bbox.bottom) { struct dwrite_glyphbitmap glyph_bitmap;
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dwrite/layout.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 03ab0bff31e..aefb49296b3 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3767,7 +3767,6 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout if (run->bbox.top == run->bbox.bottom) { struct dwrite_glyphbitmap glyph_bitmap; - RECT *bbox;
glyph_run = regular->run; glyph_run.glyphCount = run->glyphcount; @@ -3779,8 +3778,6 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout glyph_bitmap.simulations = IDWriteFontFace_GetSimulations(glyph_run.fontFace); glyph_bitmap.emsize = glyph_run.fontEmSize;
- bbox = &glyph_bitmap.bbox; - if (!(origins = calloc(glyph_run.glyphCount, sizeof(*origins)))) return;
@@ -3798,10 +3795,10 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout glyph_bitmap.glyph = glyph_run.glyphIndices[i]; dwrite_fontface_get_glyph_bbox(glyph_run.fontFace, &glyph_bitmap);
- glyph_bbox.left = bbox->left; - glyph_bbox.top = bbox->top; - glyph_bbox.right = bbox->right; - glyph_bbox.bottom = bbox->bottom; + glyph_bbox.left = glyph_bitmap.bbox.left; + glyph_bbox.top = glyph_bitmap.bbox.top; + glyph_bbox.right = glyph_bitmap.bbox.right; + glyph_bbox.bottom = glyph_bitmap.bbox.bottom;
d2d_rect_offset(&glyph_bbox, origins[i].x, origins[i].y); d2d_rect_union(&run->bbox, &glyph_bbox);