diff --git a/binding-mri/font-binding.cpp b/binding-mri/font-binding.cpp index 2a8856a..ebb1114 100644 --- a/binding-mri/font-binding.cpp +++ b/binding-mri/font-binding.cpp @@ -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")); diff --git a/src/font.cpp b/src/font.cpp index 560010c..4ac3346 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -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); }