summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/FontControl.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/FontControl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/FontControl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/FontControl.h b/noncore/apps/opie-reader/FontControl.h
index 90d39b2..563e1a8 100644
--- a/noncore/apps/opie-reader/FontControl.h
+++ b/noncore/apps/opie-reader/FontControl.h
@@ -58,13 +58,13 @@ class FontControl
tgt = 0;
}
if (tgt >= m_maxsize)
{
tgt = m_maxsize - 1;
}
- return m_fontsizes[tgt];
+ return tgt >= 0 ? m_fontsizes[tgt] : 12;
}
int ascent()
{
QFont f(name(), currentsize());
QFontMetrics fm(f);
return fm.ascent();