add facess calls for set/get font info

This commit is contained in:
Kelvin Sherlock 2014-01-29 22:46:20 -05:00
parent cd8bdfaa60
commit 5dcf23ad76

View File

@ -61,6 +61,34 @@
namespace MPW namespace MPW
{ {
uint32_t ftrap_set_font_info(uint32_t name, uint32_t parm)
{
// set_font_info(const char *name, uint32_t fontSize);
std::string sname = ToolBox::ReadCString(name, true);
uint32_t fontSize = parm;
Log(" set_font_info(%s, %04x)\n", sname.c_str(), fontSize);
return 0x40000000 | kEINVAL;
}
uint32_t ftrap_get_font_info(uint32_t name, uint32_t parm)
{
// get_font_info(const char *name, uint32 *fontSize)
std::string sname = ToolBox::ReadCString(name, true);
Log(" get_font_info(%s, %04x)\n", sname.c_str(), parm);
// default to 9pt
if (parm) memoryWriteLong(9, parm);
return 0;
}
uint32_t ftrap_get_tab_info(uint32_t name, uint32_t parm) uint32_t ftrap_get_tab_info(uint32_t name, uint32_t parm)
{ {
// get_tab_info(const char *name, uint32_t *tabSize) // get_tab_info(const char *name, uint32_t *tabSize)
@ -231,6 +259,15 @@ namespace MPW
case kF_STABINFO: case kF_STABINFO:
d0 = ftrap_set_tab_info(name, parm); d0 = ftrap_set_tab_info(name, parm);
break; break;
case kF_GFONTINFO:
d0 = ftrap_get_font_info(name, parm);
break;
case kF_SFONTINFO:
d0 = ftrap_set_font_info(name, parm);
break;
default: default:
d0 = 0x40000000 | kEINVAL; d0 = 0x40000000 | kEINVAL;