Ver Fonte

Default letterSpacing to 0

Yanrishatum há 5 anos atrás
pai
commit
58d461aeed
4 ficheiros alterados com 4 adições e 3 exclusões
  1. 1 1
      h2d/Text.hx
  2. 1 1
      h2d/domkit/BaseComponents.hx
  3. 1 1
      hxd/fmt/bfnt/FontParser.hx
  4. 1 0
      hxd/fs/Convert.hx

+ 1 - 1
h2d/Text.hx

@@ -39,7 +39,7 @@ class Text extends Drawable {
 		super(parent);
 		this.font = font;
 		textAlign = Left;
-		letterSpacing = 1;
+		letterSpacing = 0;
 		lineSpacing = 0;
 		text = "";
 		textColor = 0xFFFFFF;

+ 1 - 1
h2d/domkit/BaseComponents.hx

@@ -440,7 +440,7 @@ class TextComp extends DrawableComp implements domkit.Component.ComponentDecl<h2
 
 	@:p var text : String = "";
 	@:p(font) var font : h2d.Font;
-	@:p var letterSpacing = 1;
+	@:p var letterSpacing = 0;
 	@:p var lineSpacing = 0;
 	@:p(none) var maxWidth : Null<Int>;
 	@:p var textAlign : h2d.Text.Align = Left;

+ 1 - 1
hxd/fmt/bfnt/FontParser.hx

@@ -93,7 +93,7 @@ class FontParser {
 					var r = c.att.rect.split(" ");
 					var o = c.att.offset.split(" ");
 					var t = tile.sub(Std.parseInt(r[0]), Std.parseInt(r[1]), Std.parseInt(r[2]), Std.parseInt(r[3]), Std.parseInt(o[0]), Std.parseInt(o[1]));
-					var fc = new h2d.Font.FontChar(t, Std.parseInt(c.att.width) - 1);
+					var fc = new h2d.Font.FontChar(t, Std.parseInt(c.att.width));
 					var code = parseCode(c.att.code);
 					for( k in c.elements ){
 						var next = parseCode(k.att.id);

+ 1 - 0
hxd/fs/Convert.hx

@@ -187,6 +187,7 @@ class ConvertFNT2BFNT extends Convert {
 		// Fake tile create subs before discarding the font.
 		emptyTile = @:privateAccess new h2d.Tile(null, 0, 0, 0, 0, 0, 0);
 		super("fnt", "bfnt");
+		version = 1;
 	}
 
 	override public function convert()