aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macwindowmanager.cpp8
-rw-r--r--graphics/macgui/macwindowmanager.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 516eb84bf8..d19e40781f 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -452,11 +452,15 @@ static const char *const fontNames[] = {
"New Century Schoolbook"
};
-const char *MacWindowManager::getFontName(int id) {
+const char *MacWindowManager::getFontName(int id, int size) {
+ static char name[128];
+
if (id > ARRAYSIZE(fontNames))
return NULL;
- return fontNames[id];
+ snprintf(name, 128, "%s-%d", fontNames[id], size);
+
+ return name;
}
/////////////////
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index 3c1d89ddde..cb432d9699 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -118,9 +118,10 @@ public:
/**
* Return font name from standard ID
* @param id ID of the font
+ * @param size size of the font
* @return the font name or NULL if ID goes beyond the mapping
*/
- const char *getFontName(int id);
+ const char *getFontName(int id, int size);
/**
* Create a window with the given parameters.