Prechádzať zdrojové kódy

Font: round lineHeight/baseLine so glyphs have same vertical pixel alignment across lines.
Otherwise line heights are unpredictable.

trethaller 3 rokov pred
rodič
commit
de630f0e3c
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      h2d/Font.hx

+ 2 - 2
h2d/Font.hx

@@ -289,8 +289,8 @@ class Font {
 				k = k.next;
 				k = k.next;
 			}
 			}
 		}
 		}
-		lineHeight = lineHeight * ratio;
-		baseLine = baseLine * ratio;
+		lineHeight = Math.ceil(lineHeight * ratio);
+		baseLine = Math.ceil(baseLine * ratio);
 		this.size = size;
 		this.size = size;
 	}
 	}