WAGE: Implement font mapping
This commit is contained in:
parent
357d956a83
commit
9ecb9f5bab
2 changed files with 35 additions and 52 deletions
|
@ -99,6 +99,40 @@ void Scene::paint(Graphics::Surface *surface) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Source: Apple IIGS Technical Note #41, "Font Family Numbers"
|
||||||
|
// http://apple2.boldt.ca/?page=til/tn.iigs.041
|
||||||
|
const char *fontNames[] = {
|
||||||
|
"Chicago", // system font
|
||||||
|
"Geneva", // application font
|
||||||
|
"New York",
|
||||||
|
"Geneva",
|
||||||
|
|
||||||
|
"Monaco",
|
||||||
|
"Venice",
|
||||||
|
"London",
|
||||||
|
"Athens",
|
||||||
|
|
||||||
|
"San Francisco",
|
||||||
|
"Toronto",
|
||||||
|
"Cairo",
|
||||||
|
"Los Angeles", // 12
|
||||||
|
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL, NULL, // not in Inside Macintosh
|
||||||
|
|
||||||
|
"Times", // 20
|
||||||
|
"Helvetica",
|
||||||
|
"Courier",
|
||||||
|
"Symbol",
|
||||||
|
"Taliesin" // mobile?
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *Scene::getFontName() {
|
||||||
|
if (_fontType >= 0 && _fontType < ARRAYSIZE(fontNames) && fontNames[_fontType] != NULL) {
|
||||||
|
return fontNames[_fontType];
|
||||||
|
}
|
||||||
|
return "Unknown";
|
||||||
|
}
|
||||||
|
|
||||||
Obj::Obj(String name, Common::SeekableReadStream *data) : _currentOwner(NULL), _currentScene(NULL) {
|
Obj::Obj(String name, Common::SeekableReadStream *data) : _currentOwner(NULL), _currentScene(NULL) {
|
||||||
_name = name;
|
_name = name;
|
||||||
_classType = OBJ;
|
_classType = OBJ;
|
||||||
|
|
|
@ -403,58 +403,7 @@ public:
|
||||||
|
|
||||||
void paint(Graphics::Surface *screen);
|
void paint(Graphics::Surface *screen);
|
||||||
|
|
||||||
#if 0
|
const char *getFontName();
|
||||||
String getFontName() {
|
|
||||||
String[] fonts = {
|
|
||||||
"Chicago", // system font
|
|
||||||
"Geneva", // application font
|
|
||||||
"New York",
|
|
||||||
"Geneva",
|
|
||||||
|
|
||||||
"Monaco",
|
|
||||||
"Venice",
|
|
||||||
"London",
|
|
||||||
"Athens",
|
|
||||||
|
|
||||||
"San Francisco",
|
|
||||||
"Toronto",
|
|
||||||
"Cairo",
|
|
||||||
"Los Angeles", // 12
|
|
||||||
|
|
||||||
null, null, null, null, null, null, null, // not in Inside Macintosh
|
|
||||||
|
|
||||||
"Times", // 20
|
|
||||||
"Helvetica",
|
|
||||||
"Courier",
|
|
||||||
"Symbol",
|
|
||||||
"Taliesin" // mobile?
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
mappings found on some forums:
|
|
||||||
systemFont(0):System(Swiss)
|
|
||||||
times(20):Times New Roman(Roman)
|
|
||||||
helvetica(21):Arial(Modern)
|
|
||||||
courier(22):Courier New(Modern)
|
|
||||||
symbol(23):Symbol(Decorative)
|
|
||||||
applFont(1):Arial(Swiss)
|
|
||||||
newYork(2):Times New Roman(Roman)
|
|
||||||
geneva(3):Arial(Swiss)
|
|
||||||
monaco(4):Courier New(Modern)
|
|
||||||
venice(5):Times New Roman(Roman)
|
|
||||||
london(6):Times New Roman(Roman)
|
|
||||||
athens(7):Times New Roman(Roman)
|
|
||||||
sanFran(8):Times New Roman(Roman)
|
|
||||||
toronto(9):Times New Roman(Roman)
|
|
||||||
cairo(11):Wingdings(Decorative)
|
|
||||||
losAngeles(12):Times New Roman(Roman)
|
|
||||||
taliesin(24):Wingdings(Decorative)
|
|
||||||
*/
|
|
||||||
if (fontType >= 0 && fontType < fonts.length && fonts[fontType] != null) {
|
|
||||||
return _fonts[fontType];
|
|
||||||
}
|
|
||||||
return _"Unknown";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Sound {
|
class Sound {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue