googlefonts / fontc

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Apache License 2.0
62 stars 10 forks source link

add (failing) test case to repro #407 #817

Closed anthrotype closed 1 month ago

anthrotype commented 1 month ago

will be fixed by #779

I push it separately to demostrate this

anthrotype commented 1 month ago
ttx -q -o - -t GDEF "build-broken/font.ttf" 2>/dev/null
ttx -q -o - -t GDEF "build-fixed/font.ttf" 2>/dev/null
--- /dev/fd/63  2024-05-20 13:44:20
+++ /dev/fd/62  2024-05-20 13:44:20
@@ -15,7 +15,7 @@
             <EndCoord value="0.0"/>
           </VarRegionAxis>
           <VarRegionAxis index="1">
-            <StartCoord value="0.6"/>
+            <StartCoord value="0.0"/>
             <PeakCoord value="1.0"/>
             <EndCoord value="1.0"/>
           </VarRegionAxis>

fails as expected:

---- tests::intermediate_layer_in_designspace stdout ----
thread 'tests::intermediate_layer_in_designspace' panicked at fontc/src/lib.rs:2124:9:
assertion failed: `(left == right)`
Diff < left / right > :
 [
     [
         0.0,
         0.0,
         0.0,
     ],
     [
<        0.5999756,
>        0.0,
         1.0,
         1.0,
     ],
 ]