diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-01-31 10:28:55 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-01-31 10:32:33 +0100 |
commit | 9d5024a46e12dc91f75a964d87a1d53385c1a521 (patch) | |
tree | 9edb69528bcb1d892d7734d6bea1610335c11a8d /canvas/source | |
parent | a2c464868aca4bb38aa8afff635da56942b597ac (diff) |
cairo canvas: Zero font's width means "the same as height".
Change-Id: I1d24b2039fb3c615e672189d12c77e960cc858ee
Diffstat (limited to 'canvas/source')
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 3477c1bcf220..40da537bcc62 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -519,7 +519,11 @@ namespace cairocanvas if (aSysLayoutData.orientation) cairo_matrix_rotate(&m, (3600 - aSysLayoutData.orientation) * M_PI / 1800.0); - cairo_matrix_scale(&m, aFont.GetWidth(), aFont.GetHeight()); + long nWidth = aFont.GetWidth(); + long nHeight = aFont.GetHeight(); + if (nWidth == 0) + nWidth = nHeight; + cairo_matrix_scale(&m, nWidth, nHeight); //faux italics if (rSysFontData.bFakeItalic) |