Browse Source

fix font resize (#1192)

snwhd 1 năm trước cách đây
mục cha
commit
3933438fe7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      h2d/Font.hx

+ 1 - 1
h2d/Font.hx

@@ -279,7 +279,7 @@ class Font {
 		@param size The new font size.
 	**/
 	public function resizeTo( size : Int ) {
-		var ratio = size / initSize;
+		var ratio = size / this.size;
 		for( c in glyphs ) {
 			c.width *= ratio;
 			c.t.scaleToSize(c.t.width * ratio, c.t.height * ratio);