[Libreoffice-commits] core.git: canvas/source
Jan Holesovsky
kendy at collabora.com
Fri Jan 31 01:32:55 PST 2014
canvas/source/cairo/cairo_textlayout.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 9d5024a46e12dc91f75a964d87a1d53385c1a521
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
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 3477c1b..40da537 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)
More information about the Libreoffice-commits
mailing list