From 7c12e80552af036d8029b6fc197403e25a879e66 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 3 Aug 2016 17:28:15 +0200 Subject: WAGE/GRAPHICS: Move standard Mac font mapping to gui/ --- graphics/macgui/macwindowmanager.cpp | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'graphics/macgui/macwindowmanager.cpp') 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 ///////////////// -- cgit v1.2.3