diff --git a/src/dawn/display/font/TrueTypeFont.cpp b/src/dawn/display/font/TrueTypeFont.cpp index a99d388b..4a8de603 100644 --- a/src/dawn/display/font/TrueTypeFont.cpp +++ b/src/dawn/display/font/TrueTypeFont.cpp @@ -37,7 +37,7 @@ float_t TrueTypeFont::getScale(float_t scale) { float_t TrueTypeFont::getSpaceSize(float_t fontSize) { assertTrue(fontSize > 0); - return this->getScale(fontSize) * 18; + return this->getScale(fontSize) * 48; } float_t TrueTypeFont::getInitialLineHeight(float_t fontSize) { @@ -47,7 +47,7 @@ float_t TrueTypeFont::getInitialLineHeight(float_t fontSize) { float_t TrueTypeFont::getLineHeight(float_t fontSize) { assertTrue(fontSize > 0); - return 96.0f * this->getScale(fontSize); + return 128.0f * this->getScale(fontSize); } void TrueTypeFont::buffer( diff --git a/src/dawnpokergame/CMakeLists.txt b/src/dawnpokergame/CMakeLists.txt index 18066a5b..96a3a3ea 100644 --- a/src/dawnpokergame/CMakeLists.txt +++ b/src/dawnpokergame/CMakeLists.txt @@ -32,6 +32,6 @@ tool_texture(texture_test texture_test.png) tool_language(locale_poker ${DIR_GAME_ASSETS}/locale/locale.xml) tool_tileset(tileset_death texture_death ${DIR_GAME_ASSETS}/characters/death/sheet.png 1 3) tool_tileset(tileset_penny texture_penny ${DIR_GAME_ASSETS}/characters/penny/sheet.png 1 3) -tool_truetype(truetype_alice ${DIR_GAME_ASSETS}/font/Alice-Regular.ttf truetype_alice 2048 2048 120) +tool_truetype(truetype_bizudp ${DIR_GAME_ASSETS}/font/BIZUDPGothic-Regular.ttf truetype_bizudp 2048 2048 120) tool_audio(audio_test borrowed/sample_short.wav) tool_vnscene(Scene_1 ${DIR_GAME_ASSETS}/vn/Scene_1.xml) \ No newline at end of file diff --git a/src/dawnpokergame/prefabs/ui/VisualNovelTextboxPrefab.hpp b/src/dawnpokergame/prefabs/ui/VisualNovelTextboxPrefab.hpp index 3655a139..4a20dd71 100644 --- a/src/dawnpokergame/prefabs/ui/VisualNovelTextboxPrefab.hpp +++ b/src/dawnpokergame/prefabs/ui/VisualNovelTextboxPrefab.hpp @@ -1,43 +1,43 @@ -// Copyright (c) 2023 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT - -#pragma once -#include "prefabs/ui/UIBorderPrefab.hpp" -#include "visualnovel/ui/VisualNovelTextbox.hpp" - -namespace Dawn { - class VisualNovelTextboxPrefab : - public UIPrefab - { - public: - static std::vector prefabAssets(AssetManager *man) { - std::vector assets; - assets.push_back(man->get("truetype_alice")); - vectorAppend(&assets, UIBorderPrefab::getRequiredAssets(man)); - return assets; - } - - static void prefabApply(AssetManager *man, VisualNovelTextbox *textbox) { - auto assetFont = man->get("truetype_alice"); - UIBorderPrefab::apply(&textbox->border); - textbox->setFont(&assetFont->font); - textbox->setFontSize(48.0f); - textbox->setLabelPadding(glm::vec2(2, 2)); - textbox->label.textColor = COLOR_WHITE; - - textbox->setTransform( - UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_END, - glm::vec4( - 0, - (assetFont->font.getLineHeight(textbox->getFontSize()) * 4) + - (textbox->border.getBorderSize().y * 2.0f) + - (textbox->getLabelPadding().y * 2.0f), - 0, 0 - ), - 0.0f - ); - } - }; +// Copyright (c) 2023 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "prefabs/ui/UIBorderPrefab.hpp" +#include "visualnovel/ui/VisualNovelTextbox.hpp" + +namespace Dawn { + class VisualNovelTextboxPrefab : + public UIPrefab + { + public: + static std::vector prefabAssets(AssetManager *man) { + std::vector assets; + assets.push_back(man->get("truetype_bizudp")); + vectorAppend(&assets, UIBorderPrefab::getRequiredAssets(man)); + return assets; + } + + static void prefabApply(AssetManager *man, VisualNovelTextbox *textbox) { + auto assetFont = man->get("truetype_bizudp"); + UIBorderPrefab::apply(&textbox->border); + textbox->setFont(&assetFont->font); + textbox->setFontSize(36.0f); + textbox->setLabelPadding(glm::vec2(2, 2)); + textbox->label.textColor = COLOR_WHITE; + + textbox->setTransform( + UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_END, + glm::vec4( + 0, + (assetFont->font.getLineHeight(textbox->getFontSize()) * 4) + + (textbox->border.getBorderSize().y * 2.0f) + + (textbox->getLabelPadding().y * 2.0f), + 0, 0 + ), + 0.0f + ); + } + }; } \ No newline at end of file diff --git a/src/dawntools/tools/generatedlanguages/GeneratedLanguages.cpp b/src/dawntools/tools/generatedlanguages/GeneratedLanguages.cpp index b95122b8..97a43679 100644 --- a/src/dawntools/tools/generatedlanguages/GeneratedLanguages.cpp +++ b/src/dawntools/tools/generatedlanguages/GeneratedLanguages.cpp @@ -92,7 +92,6 @@ int32_t GeneratedLanguages::start() { std::cout << "Language " << itLang->first << " is missing key " << key << std::endl; return 1; } - std::cout << "bruh " << exist->second << std::endl; bufferOut += exist->first + "|" + exist->second + "|"; ++itKeys; }