Browse Source

bufix for lime

kiroukou 9 years ago
parent
commit
b8c91acfde
1 changed files with 3 additions and 3 deletions
  1. 3 3
      hxd/res/Font.hx

+ 3 - 3
hxd/res/Font.hx

@@ -3,7 +3,9 @@ package hxd.res;
 class Font extends Resource {
 
 	public function build( size : Int, ?options ) : h2d.Font {
-		#if flash
+		#if lime
+		return FontBuilder.getFont(name, size, options);
+		#elseif flash
 		var fontClass : Class<flash.text.Font> = cast Type.resolveClass("_R_" + ~/[^A-Za-z0-9_]/g.replace(entry.path, "_"));
 		if( fontClass == null ) throw "Embeded font not found " + entry.path;
 		var font = Type.createInstance(fontClass, []);
@@ -11,8 +13,6 @@ class Font extends Resource {
 		#elseif js
 		var name = "R_" + ~/[^A-Za-z0-9_]/g.replace(entry.path, "_");
 		return FontBuilder.getFont(name, size, options);
-		#elseif lime
-		return FontBuilder.getFont(name, size, options);
 		#else
 		throw "Not implemented for this platform";
 		return null;