shithub: fnt

Download patch

ref: 5877598b3b65ae59ec9d1447e222af4b1e848911
parent: c609f9639ffd99236a5403a057a5d920244fe3c9
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Jul 14 21:24:03 EDT 2024

no need to store unitsPerEm in each Glyf anymore

--- a/otf.c.in
+++ b/otf.c.in
@@ -581,8 +581,6 @@
 	if(read_Glyf(o, g) < 0){
 		free(g);
 		g = nil;
-	}else{
-		g->unitsPerEm = o->td.head->unitsPerEm;
 	}
 	otfpoprange(o);
 	otfpoprange(o);
--- a/otf.rkt
+++ b/otf.rkt
@@ -209,7 +209,7 @@
  {int16 xMax}
  {int16 yMax}
  #:extra
- (list (cons 'field (list (~a "ComponentGlyph *component;") (~a "SimpleGlyph *simple;") (~a "u16int unitsPerEm;")))
+ (list (cons 'field (list (~a "ComponentGlyph *component;") (~a "SimpleGlyph *simple;")))
        (cons 'read
              (list (~a "if(v->numberOfContours < 0 && read_ComponentGlyph(o, &v->component, 0) < 0)")
                    (~a "	goto err;")
--- a/plan9/otf.c
+++ b/plan9/otf.c
@@ -595,8 +595,6 @@
 	if(read_Glyf(o, g) < 0){
 		free(g);
 		g = nil;
-	}else{
-		g->unitsPerEm = o->td.head->unitsPerEm;
 	}
 	otfpoprange(o);
 	otfpoprange(o);
--- a/plan9/otf.h
+++ b/plan9/otf.h
@@ -469,7 +469,6 @@
 	s16int yMax;
 	ComponentGlyph *component;
 	SimpleGlyph *simple;
-	u16int unitsPerEm;
 };
 
 int read_Glyf(Otf *o, Glyf *v);