summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/FontControl.h
Unidiff
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
58 tgt = 0; 58 tgt = 0;
59 } 59 }
60 if (tgt >= m_maxsize) 60 if (tgt >= m_maxsize)
61 { 61 {
62 tgt = m_maxsize - 1; 62 tgt = m_maxsize - 1;
63 } 63 }
64 return m_fontsizes[tgt]; 64 return tgt >= 0 ? m_fontsizes[tgt] : 12;
65 } 65 }
66 int ascent() 66 int ascent()
67 { 67 {
68 QFont f(name(), currentsize()); 68 QFont f(name(), currentsize());
69 QFontMetrics fm(f); 69 QFontMetrics fm(f);
70 return fm.ascent(); 70 return fm.ascent();