[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - canvas/source
Jan Holesovsky
kendy at collabora.com
Sun Feb 2 05:25:41 PST 2014
canvas/source/cairo/cairo_textlayout.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit b3a5e7bf97c3761ede9dce54f82da513c062af68
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Jan 31 10:28:55 2014 +0100
cairo canvas: Zero font's width means "the same as height".
Change-Id: I1d24b2039fb3c615e672189d12c77e960cc858ee
Reviewed-on: https://gerrit.libreoffice.org/7763
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 35defcd..8924b4f 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -518,7 +518,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)
More information about the Libreoffice-commits
mailing list