Cleaning code a bit. No need to call Font.loadGlyphs since this is done automatically by Text.fromString

This commit is contained in:
Daniel Uranga
2015-01-23 13:41:00 -03:00
committed by MattTuttle
parent 5b2287a374
commit 23f8e01d2a
3 changed files with 1 additions and 8 deletions

View File

@@ -67,8 +67,7 @@ namespace lime {
private: private:
bool InsertCodepoint (unsigned long codepoint); bool InsertCodepoint (unsigned long codepoint, bool b = true);
bool InsertCodepoint (unsigned long codepoint, bool b);
std::list<GlyphInfo> glyphList; std::list<GlyphInfo> glyphList;
size_t mSize; size_t mSize;

View File

@@ -528,15 +528,10 @@ namespace lime {
} }
bool Font::InsertCodepointFromIndex (unsigned long codepoint) { bool Font::InsertCodepointFromIndex (unsigned long codepoint) {
return InsertCodepoint(codepoint, false); return InsertCodepoint(codepoint, false);
} }
bool Font::InsertCodepoint (unsigned long codepoint) {
return InsertCodepoint(codepoint, true);
}
bool Font::InsertCodepoint (unsigned long codepoint, bool b) { bool Font::InsertCodepoint (unsigned long codepoint, bool b) {
GlyphInfo info; GlyphInfo info;

View File

@@ -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) { 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); points = textFormat.fromString (font, size, text);
font.loadGlyphs (size, text);
image = font.createImage (); image = font.createImage ();
this.text = text; this.text = text;
this.size = size; this.size = size;