From: John Ellson Date: Wed, 6 Nov 2013 14:49:29 +0000 (-0500) Subject: fix fontsize, fontname X-Git-Tag: 2.38.0~205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ef9fcff804e1e939b1af06857c8b32787e41c36;p=graphviz fix fontsize, fontname --- diff --git a/plugin/gdiplus/gvrender_gdiplus.cpp b/plugin/gdiplus/gvrender_gdiplus.cpp index 0e66159bb..b12abd09f 100755 --- a/plugin/gdiplus/gvrender_gdiplus.cpp +++ b/plugin/gdiplus/gvrender_gdiplus.cpp @@ -177,7 +177,7 @@ static void gdiplusgen_textspan(GVJ_t *job, pointf p, textspan_t *span) if (span->free_layout == &gdiplus_free_layout) layout = (Layout*)span->layout; else - layout = new Layout(span->fontname, span->fontsize, span->str); + layout = new Layout(span->font->name, span->font->size, span->str); /* draw the text */ SolidBrush brush(Color(job->obj->pencolor.u.rgba [3], job->obj->pencolor.u.rgba [0], job->obj->pencolor.u.rgba [1], job->obj->pencolor.u.rgba [2])); diff --git a/plugin/gdiplus/gvtextlayout_gdiplus.cpp b/plugin/gdiplus/gvtextlayout_gdiplus.cpp index 8930fedd7..606ce8512 100755 --- a/plugin/gdiplus/gvtextlayout_gdiplus.cpp +++ b/plugin/gdiplus/gvtextlayout_gdiplus.cpp @@ -82,7 +82,7 @@ boolean gdiplus_textlayout(textspan_t *span, char **fontpath) /* ensure GDI+ is started up: since we get called outside of a job, we can't rely on GDI+ startup then */ UseGdiplus(); - Layout* layout = new Layout(span->fontname, span->fontsize, span->str); + Layout* layout = new Layout(span->font->name, span->font->size, span->str); /* measure the text */ /* NOTE: use TextRenderingHintAntiAlias + GetGenericTypographic to get a layout without extra space at beginning and end */