shithub: fnt

Download patch

ref: 1ad7240c8dc59d124cb5ee0f1b1fe5ddaeff90ad
parent: d80042223e0f2b2bdcd6342fbf1d76e36afcf9e7
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Jul 17 23:44:26 EDT 2024

fix cmap subtable format 4 offset calculation

--- a/otf.c.in
+++ b/otf.c.in
@@ -693,7 +693,7 @@
 				x += 65536;
 			return x;
 		}else{
-			x = i + sc->idRangeOffset[i]/2 + (r - sc->startCode[i]);
+			x = i + sc->idRangeOffset[i]/2 + (r - sc->startCode[i]) - segC;
 			n = (sc->length-((8*2)+(sc->segCountX2*4)))/2;
 			if(x < 0 || x >= n)
 				break;