summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-18 04:57:15 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-18 04:57:15 +0300
commitec6c80d170c4a30e76abc22c889aa8cf27fb45a4 (patch)
tree731b2ff100005f6deb5951ff516d45897c9f94fe
parentea7ce2d1099761d4f10a1985cc1491dd306093fb (diff)
downloadplus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.tar.gz
plus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.tar.bz2
plus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.tar.xz
plus-ec6c80d170c4a30e76abc22c889aa8cf27fb45a4.zip
Remove default parameter from font constructor and load function.
-rw-r--r--src/gui/fonts/font.h4
-rw-r--r--src/gui/gui.cpp16
-rw-r--r--src/progs/manaplus/actions/actions.cpp2
3 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/fonts/font.h b/src/gui/fonts/font.h
index f4f30a8be..4f3670374 100644
--- a/src/gui/fonts/font.h
+++ b/src/gui/fonts/font.h
@@ -90,7 +90,7 @@ class Font final
public:
Font(std::string filename,
int size,
- const int style = 0);
+ const int style);
A_DELETE_COPY(Font)
@@ -98,7 +98,7 @@ class Font final
void loadFont(std::string filename,
const int size,
- const int style = 0) restrict2;
+ const int style) restrict2;
int getWidth(const std::string &text) const restrict2 A_WARN_UNUSED;
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 706a5f0b8..c5d6bc95c 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -193,7 +193,7 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("font");
- mGuiFont = new Font(fontFile, fontSize);
+ mGuiFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set particle font
fontFile = config.getValue("particleFont", "");
@@ -219,21 +219,21 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("boldFont");
- boldFont = new Font(fontFile, fontSize);
+ boldFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set help font
fontFile = config.getValue("helpFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("helpFont");
- mHelpFont = new Font(fontFile, fontSize);
+ mHelpFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set secure font
fontFile = config.getValue("secureFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("secureFont");
- mSecureFont = new Font(fontFile, fontSize);
+ mSecureFont = new Font(fontFile, fontSize, TTF_STYLE_NORMAL);
// Set npc font
const int npcFontSize = config.getIntValue("npcfontSize");
@@ -253,7 +253,7 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("npcFont");
- mNpcFont = new Font(fontFile, npcFontSize);
+ mNpcFont = new Font(fontFile, npcFontSize, TTF_STYLE_NORMAL);
Widget::setGlobalFont(mGuiFont);
@@ -816,7 +816,7 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("font");
- mGuiFont->loadFont(fontFile, fontSize);
+ mGuiFont->loadFont(fontFile, fontSize, TTF_STYLE_NORMAL);
fontFile = config.getValue("particleFont", "");
if (fontFile.empty())
@@ -828,7 +828,7 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("boldFont");
- boldFont->loadFont(fontFile, fontSize);
+ boldFont->loadFont(fontFile, fontSize, TTF_STYLE_NORMAL);
const int npcFontSize = config.getIntValue("npcfontSize");
@@ -836,7 +836,7 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("npcFont");
- mNpcFont->loadFont(fontFile, npcFontSize);
+ mNpcFont->loadFont(fontFile, npcFontSize, TTF_STYLE_NORMAL);
}
void Gui::distributeMouseEvent(Widget *const source,
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp
index 458332fb0..0827418c7 100644
--- a/src/progs/manaplus/actions/actions.cpp
+++ b/src/progs/manaplus/actions/actions.cpp
@@ -1478,7 +1478,7 @@ impHandler(dumpMods)
#if defined USE_OPENGL && defined DEBUG_SDLFONT
impHandler0(testSdlFont)
{
- Font *font = new Font("fonts/dejavusans.ttf", 18);
+ Font *font = new Font("fonts/dejavusans.ttf", 18, TTF_STYLE_NORMAL);
timespec time1;
timespec time2;
NullOpenGLGraphics *nullGraphics = new NullOpenGLGraphics;