r17027 by fschmid - Fixed Bug 10297: "Frame of Glyphs to insert has too small height"
scribus-commit
scribus-commit at lists.scribus.net
Sat Nov 26 09:26:34 UTC 2011
Author: fschmid
Date: Sat Nov 26 09:26:33 2011
New Revision: 17027
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17027
Log:
Fixed Bug 10297: "Frame of Glyphs to insert has too small height"
Modified:
trunk/Scribus/scribus/fonts/scfontmetrics.cpp
Modified: trunk/Scribus/scribus/fonts/scfontmetrics.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17027&path=/trunk/Scribus/scribus/fonts/scfontmetrics.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scfontmetrics.cpp (original)
+++ trunk/Scribus/scribus/fonts/scfontmetrics.cpp Sat Nov 26 09:26:33 2011
@@ -239,12 +239,13 @@
qreal uniEM = static_cast<qreal>(face->units_per_EM);
qreal m_descent = face->descender / uniEM;
- qreal m_height = face->height / uniEM;
- if (m_height == 0)
- m_height = (face->bbox.yMax - face->bbox.yMin) / uniEM;
+ qreal m_height = qMax(face->height / uniEM, (face->bbox.yMax - face->bbox.yMin) / uniEM);
+// if (m_height == 0)
+// m_height = (face->bbox.yMax - face->bbox.yMin) / uniEM;
int h = qRound(m_height * s) + 1;
qreal a = m_descent * s + 1;
+ a = 0;
int w = qRound((face->bbox.xMax - face->bbox.xMin) / uniEM) * s * (ts.length()+1);
if (w < 1)
w = s * (ts.length()+1);
More information about the scribus-commit
mailing list