From 23f8e01d2aae9cfa72393ef793e7f7be7aa71f25 Mon Sep 17 00:00:00 2001 From: Daniel Uranga Date: Fri, 23 Jan 2015 13:41:00 -0300 Subject: [PATCH] Cleaning code a bit. No need to call Font.loadGlyphs since this is done automatically by Text.fromString --- project/include/graphics/Font.h | 3 +-- project/src/graphics/Font.cpp | 5 ----- samples/TextRendering/Source/Main.hx | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/project/include/graphics/Font.h b/project/include/graphics/Font.h index 36e2932d2..50902331d 100644 --- a/project/include/graphics/Font.h +++ b/project/include/graphics/Font.h @@ -67,8 +67,7 @@ namespace lime { private: - bool InsertCodepoint (unsigned long codepoint); - bool InsertCodepoint (unsigned long codepoint, bool b); + bool InsertCodepoint (unsigned long codepoint, bool b = true); std::list glyphList; size_t mSize; diff --git a/project/src/graphics/Font.cpp b/project/src/graphics/Font.cpp index 04d64fa92..735c36176 100644 --- a/project/src/graphics/Font.cpp +++ b/project/src/graphics/Font.cpp @@ -528,15 +528,10 @@ namespace lime { } - bool Font::InsertCodepointFromIndex (unsigned long codepoint) { return InsertCodepoint(codepoint, false); } - bool Font::InsertCodepoint (unsigned long codepoint) { - return InsertCodepoint(codepoint, true); - } - bool Font::InsertCodepoint (unsigned long codepoint, bool b) { GlyphInfo info; diff --git a/samples/TextRendering/Source/Main.hx b/samples/TextRendering/Source/Main.hx index dec5b65d4..2302a852d 100644 --- a/samples/TextRendering/Source/Main.hx +++ b/samples/TextRendering/Source/Main.hx @@ -23,7 +23,6 @@ class TextField { public function new (text:String, size:Int, textFormat:TextFormat, font:Font, context:RenderContext, x:Float=0, y:Float=0) { points = textFormat.fromString (font, size, text); - font.loadGlyphs (size, text); image = font.createImage (); this.text = text; this.size = size;