summaryrefslogtreecommitdiff
path: root/imon.c
diff options
context:
space:
mode:
Diffstat (limited to 'imon.c')
-rw-r--r--imon.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/imon.c b/imon.c
index b455eba..92f71d1 100644
--- a/imon.c
+++ b/imon.c
@@ -132,7 +132,10 @@ ciMonLCD::~ciMonLCD() {
*/
int ciMonLCD::open(const char* szDevice, eProtocol pro)
{
- if(!SetFont(theSetup.m_szFont,theSetup.m_bTwoLineMode)) {
+ if(!SetFont(theSetup.m_szFont,
+ theSetup.m_bTwoLineMode,
+ theSetup.m_nBigFontHeight,
+ theSetup.m_nSmallFontHeight)) {
return -1;
}
@@ -636,18 +639,17 @@ int ciMonLCD::lengthToPixels(int length)
return (pixLen[32 + length] ^ 0xffffffff);
}
-bool ciMonLCD::SetFont(const char *szFont, int bTwoLineMode) {
+bool ciMonLCD::SetFont(const char *szFont, int bTwoLineMode, int nBigFontHeight, int nSmallFontHeight) {
ciMonFont* tmpFont = NULL;
cString sFileName = cFont::GetFontFileName(szFont);
if(!isempty(sFileName))
{
- if (bTwoLineMode)
- {
- tmpFont = new ciMonFont(sFileName,6,8);
+ if (bTwoLineMode) {
+ tmpFont = new ciMonFont(sFileName,nSmallFontHeight);
} else {
- tmpFont = new ciMonFont(sFileName,12,11);
+ tmpFont = new ciMonFont(sFileName,nBigFontHeight);
}
} else {
esyslog("iMonLCD: unable to find file for font '%s'",szFont);