Added more variants of Ysabeuau fonts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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:
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
// // // // // // // // // // // // // // // // // // // // // // // // // // //
|
||||
|
Reference in New Issue
Block a user