Font: Fix default fonts for VX+

This commit is contained in:
Mathew Velasquez 2015-11-30 16:19:32 -05:00
parent 53b5b923d4
commit c75edbb83a
2 changed files with 16 additions and 1 deletions

View File

@ -314,6 +314,7 @@ fontBindingInit()
if (rgssVer >= 2)
{
VALUE defNames = rb_ary_new2(3);
rb_ary_push(defNames, rb_str_new2(Font::getDefaultName()));
rb_ary_push(defNames, rb_str_new2("Verdana"));
rb_ary_push(defNames, rb_str_new2("Arial"));
rb_ary_push(defNames, rb_str_new2("Courier New"));

View File

@ -278,7 +278,7 @@ struct FontPrivate
}
};
std::string FontPrivate::defaultName = "Arial";
std::string FontPrivate::defaultName = ""; /* Inited at runtime */
int FontPrivate::defaultSize = 22;
bool FontPrivate::defaultBold = false;
bool FontPrivate::defaultItalic = false;
@ -395,6 +395,20 @@ void Font::initDefaultDynAttribs()
void Font::initDefaults()
{
switch (rgssVer)
{
case 1:
default:
FontPrivate::defaultName = "Arial";
break;
case 2:
FontPrivate::defaultName = "UmePlus Gothic";
break;
case 3:
FontPrivate::defaultName = "VL Gothic";
break;
}
FontPrivate::defaultOutline = (rgssVer >= 3 ? true : false);
FontPrivate::defaultShadow = (rgssVer == 2 ? true : false);
}