Removed old TrueType
This commit is contained in:
		@@ -89,7 +89,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
 | 
			
		||||
  struct FontShaderBufferData fontData;
 | 
			
		||||
  quadCountTotal = 0;
 | 
			
		||||
  std::vector<struct UILabelText> realNewTexts;
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  // Reset
 | 
			
		||||
  lines.clear();
 | 
			
		||||
 | 
			
		||||
@@ -115,7 +115,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
 | 
			
		||||
 | 
			
		||||
    // Lock the font
 | 
			
		||||
    assertNotNull(text.style.font);
 | 
			
		||||
    realText.lockId = text.style.font->lock(NewTrueTypeFaceTextureStyle{
 | 
			
		||||
    realText.lockId = text.style.font->lock(TrueTypeFaceTextureStyle{
 | 
			
		||||
      text.style.size,
 | 
			
		||||
      text.style.style
 | 
			
		||||
    });
 | 
			
		||||
@@ -189,7 +189,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // Validate characters
 | 
			
		||||
      assertTrue(ch >= NEW_TRUETYPE_CHAR_BEGIN && ch < NEW_TRUETYPE_CHAR_END);
 | 
			
		||||
      assertTrue(ch >= TRUE_TYPE_CHAR_BEGIN && ch < TRUE_TYPE_CHAR_END);
 | 
			
		||||
      assertTrue(ch != '\r');
 | 
			
		||||
      assertTrue(ch != '\t');
 | 
			
		||||
      assertTrue(ch != '\n');
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
#include "scene/components/ui/UIComponentRenderable.hpp"
 | 
			
		||||
#include "display/mesh/QuadMesh.hpp"
 | 
			
		||||
#include "asset/assets/NewTrueTypeAsset.hpp"
 | 
			
		||||
#include "asset/assets/TrueTypeAsset.hpp"
 | 
			
		||||
#include "util/Xml.hpp"
 | 
			
		||||
 | 
			
		||||
#define UI_LABEL_MAX_WIDTH_NONE -1
 | 
			
		||||
@@ -16,7 +16,7 @@ namespace Dawn {
 | 
			
		||||
    struct Color color = COLOR_WHITE;
 | 
			
		||||
    flag_t style = 0;
 | 
			
		||||
    uint32_t size = 16;
 | 
			
		||||
    NewTrueTypeAsset *font = nullptr;
 | 
			
		||||
    TrueTypeAsset *font = nullptr;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  struct UILabelText {
 | 
			
		||||
@@ -25,7 +25,7 @@ namespace Dawn {
 | 
			
		||||
    int32_t lineStart = 0;
 | 
			
		||||
    int32_t lineCount = 0;
 | 
			
		||||
    usagelockid_t lockId = -1;
 | 
			
		||||
    struct NewTrueTypeFaceTexture *texture = nullptr;
 | 
			
		||||
    struct TrueTypeFaceTexture *texture = nullptr;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  struct UILabelLine {
 | 
			
		||||
@@ -38,13 +38,13 @@ namespace Dawn {
 | 
			
		||||
    private:
 | 
			
		||||
      Mesh mesh;
 | 
			
		||||
      FontShaderBuffer shaderBuffer;
 | 
			
		||||
      std::map<NewTrueTypeFaceTexture*, int32_t> textureMap;
 | 
			
		||||
      std::map<TrueTypeFaceTexture*, int32_t> textureMap;
 | 
			
		||||
 | 
			
		||||
    public:
 | 
			
		||||
      int32_t quadStart = 0;
 | 
			
		||||
      int32_t quadCount = -1;
 | 
			
		||||
      int32_t quadCountTotal = -1;
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
      std::vector<struct UILabelText> texts;
 | 
			
		||||
      std::vector<struct UILabelText> textsBuffered;
 | 
			
		||||
      std::vector<struct UILabelLine> lines;
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ void UIRichTextLabel::onStart() {
 | 
			
		||||
 | 
			
		||||
          struct UILabelStyle style;
 | 
			
		||||
          if(child->attributes.contains("font")) {
 | 
			
		||||
            style.font = this->getGame()->assetManager.get<NewTrueTypeAsset>(child->attributes["font"]);
 | 
			
		||||
            style.font = this->getGame()->assetManager.get<TrueTypeAsset>(child->attributes["font"]);
 | 
			
		||||
          } else {
 | 
			
		||||
            style.font = current.font;
 | 
			
		||||
          }
 | 
			
		||||
@@ -51,8 +51,8 @@ void UIRichTextLabel::onStart() {
 | 
			
		||||
          if(child->attributes.contains("style")) {
 | 
			
		||||
            std::string s = child->attributes["style"];
 | 
			
		||||
            style.style = 0;
 | 
			
		||||
            if(s.find("bold") != std::string::npos) style.style |= NEW_TRUETYPE_VARIANT_BOLD;
 | 
			
		||||
            if(s.find("italic") != std::string::npos) style.style |= NEW_TRUETYPE_VARIANT_ITALICS;
 | 
			
		||||
            if(s.find("bold") != std::string::npos) style.style |= TRUE_TYPE_VARIANT_BOLD;
 | 
			
		||||
            if(s.find("italic") != std::string::npos) style.style |= TRUE_TYPE_VARIANT_ITALICS;
 | 
			
		||||
          } else {
 | 
			
		||||
            style.style = current.style;
 | 
			
		||||
          }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user