Added more variants of Ysabeuau fonts

This commit is contained in:
2023-06-18 00:42:49 -07:00
parent 0ea7f1d749
commit 24cf072b97
8 changed files with 16 additions and 12 deletions

View File

@@ -13,13 +13,13 @@ TrueTypeFile::TrueTypeFile(std::string path) : file(path) {
// Remove extension
size_t pos = path.find_last_of(".");
std::string filename = path.substr(0, pos);
std::string pathLower = stringToLowercase(path);
style = 0;
if(path.find("bold") != std::string::npos || filename.ends_with("bd") || filename.ends_with("bi")) {
if(pathLower.find("bold") != std::string::npos || filename.ends_with("bd") || filename.ends_with("bi")) {
style |= TRUE_TYPE_VARIANT_BOLD;
}
if(path.find("italics") != std::string::npos || filename.ends_with("i") || filename.ends_with("bi")) {
if(pathLower.find("italic") != std::string::npos || filename.ends_with("i") || filename.ends_with("bi")) {
style |= TRUE_TYPE_VARIANT_ITALICS;
}

View File

@@ -7,6 +7,7 @@
#include "util/DawnTool.hpp"
#include "util/File.hpp"
#include "display/font/truetype/TrueTypeShared.hpp"
#include "util/string.hpp"
namespace Dawn {
class TrueTypeFile {

View File

@@ -23,7 +23,7 @@ void VNSceneGen::test(
case VN_SCENE_EVENT_TYPE_TEXT:
initType = "VNTextEvent";
toInclude = "games/vn/events/VNTextEvent.hpp";
line(&afterLines, eventName + "->" + "text = \"" + event->text.texts.begin()->text + "\";", "");
line(&afterLines, eventName + "->" + "text = " + event->text.texts.begin()->text + ";", "");
break;
case VN_SCENE_EVENT_TYPE_POSITION:

View File

@@ -4,6 +4,7 @@
// https://opensource.org/licenses/MIT
#include "VNTextEventParser.hpp"
#include "util/parser/TypeParsers.hpp"
using namespace Dawn;
@@ -22,8 +23,8 @@ int32_t VNTextParser::onParse(
std::string *error
) {
out->language = values["lang"];
out->text = node->value;
return 0;
out->text = stringParser(node->innerXml, error);
return error->length() == 0 ? 0 : -1;
}
// // // // // // // // // // // // // // // // // // // // // // // // // // //