shithub: fnt

Download patch

ref: eda59c651d04dfec8592b0b3658ee7dab599f107
parent: 443555e5d740523436a4aa6b3317d9c92bb3c8ef
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Jul 21 22:46:18 EDT 2024

increase the tiny vertical gap, apparently a few glyphs still render incorrectly without it

--- a/rast.c
+++ b/rast.c
@@ -639,14 +639,14 @@
 		/* height+baseline is where it is in the image */
 		baseline = floor(bb[1]);
 		offY = -baseline;
-		if(offY == -bb[1]){
+		if(offY+bb[1] < ε){
 			/*
 			 * very rarely a glyph will have one of its segments
 			 * go over the edge because of imprecise arithmetic.
 			 * it's much easier to solve this by always having a small gap.
 			 */
-			offY += ε;
-			bb[3] += ε;
+			offY += 4*ε;
+			bb[3] += 8*ε;
 		}
 		bb[3] += offY;
 		w = ceil(bb[2] - bb[0]);