cairo canvas: Zero font's width means "the same as height".

Change-Id: I1d24b2039fb3c615e672189d12c77e960cc858ee
This commit is contained in:
Jan Holesovsky
2014-01-31 10:28:55 +01:00
parent a2c464868a
commit 9d5024a46e

View File

@@ -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)