diff options
author | Eugene Sandulenko | 2016-08-03 17:28:15 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 17:28:15 +0200 |
commit | 7c12e80552af036d8029b6fc197403e25a879e66 (patch) | |
tree | 8e7bc98c5ac3a4f4d4db00b93ff5a08f05d8f2c5 /graphics/macgui | |
parent | 01a240ca815d9b41b7ab903a4077ae11bb98e77a (diff) | |
download | scummvm-rg350-7c12e80552af036d8029b6fc197403e25a879e66.tar.gz scummvm-rg350-7c12e80552af036d8029b6fc197403e25a879e66.tar.bz2 scummvm-rg350-7c12e80552af036d8029b6fc197403e25a879e66.zip |
WAGE/GRAPHICS: Move standard Mac font mapping to gui/
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macwindowmanager.cpp | 51 | ||||
-rw-r--r-- | graphics/macgui/macwindowmanager.h | 7 |
2 files changed, 58 insertions, 0 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp index 9d3b729661..516eb84bf8 100644 --- a/graphics/macgui/macwindowmanager.cpp +++ b/graphics/macgui/macwindowmanager.cpp @@ -408,6 +408,57 @@ const Graphics::Font *MacWindowManager::getFont(const char *name, Graphics::Font return font; } +// Source: Apple IIGS Technical Note #41, "Font Family Numbers" +// http://apple2.boldt.ca/?page=til/tn.iigs.041 +static const char *const fontNames[] = { + "Chicago", // system font + "Geneva", // application font + "New York", + "Geneva", + + "Monaco", + "Venice", + "London", + "Athens", + + "San Francisco", + "Toronto", + NULL, + "Cairo", + "Los Angeles", // 12 + + "Zapf Dingbats", + "Bookman", + "Helvetica Narrow", + "Palatino", + NULL, + "Zapf Chancery", + NULL, + + "Times", // 20 + "Helvetica", + "Courier", + "Symbol", + "Taliesin", // mobile? + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // 30 + NULL, + NULL, + "Avant Garde", + "New Century Schoolbook" +}; + +const char *MacWindowManager::getFontName(int id) { + if (id > ARRAYSIZE(fontNames)) + return NULL; + + return fontNames[id]; +} + ///////////////// // Cursor stuff ///////////////// diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index 22731a142e..3c1d89ddde 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -116,6 +116,13 @@ public: const Font *getFont(const char *name, FontManager::FontUsage fallback); /** + * Return font name from standard ID + * @param id ID of the font + * @return the font name or NULL if ID goes beyond the mapping + */ + const char *getFontName(int id); + + /** * Create a window with the given parameters. * Note that this method allocates the necessary memory for the window. * @param scrollable True if the window has to be scrollable. |