From 6e5ddfe4fcde7bb679b00152e347f3a1fb9f5e0e Mon Sep 17 00:00:00 2001 From: Nikita Prokopov Date: Mon, 6 Dec 2021 21:43:36 +0100 Subject: [PATCH] (hopefully) fixed monospaced #1325 --- FiraCode.glyphs | 20 +++++++++++--------- clojure/fira_code/checks.clj | 15 ++++++--------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/FiraCode.glyphs b/FiraCode.glyphs index 2ff1d1d..8b11a0d 100644 --- a/FiraCode.glyphs +++ b/FiraCode.glyphs @@ -1,7 +1,9 @@ { .appVersion = "3091"; DisplayStrings = ( -".-\012.=\012:-\012:=" +"/fraction", +"/uniE000/uniE001/uniE002/uniE003", +"/null" ); classes = ( { @@ -62048,7 +62050,7 @@ unicode = 2079; { color = 3; glyphname = fraction; -lastChange = "2021-08-08 18:27:52 +0000"; +lastChange = "2021-12-06 20:35:57 +0000"; layers = ( { layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA"; @@ -62063,7 +62065,7 @@ nodes = ( ); } ); -width = 0; +width = 1200; }, { layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69"; @@ -125172,7 +125174,7 @@ nodes = ( ); } ); -width = 0; +width = 1200; }, { layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69"; @@ -125597,7 +125599,7 @@ unicode = E000; }, { glyphname = uniE001; -lastChange = "2021-08-08 18:27:53 +0000"; +lastChange = "2021-12-06 20:36:30 +0000"; layers = ( { layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA"; @@ -125900,7 +125902,7 @@ nodes = ( ); } ); -width = 0; +width = 1200; }, { layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69"; @@ -126210,7 +126212,7 @@ unicode = E001; }, { glyphname = uniE002; -lastChange = "2021-08-08 18:27:53 +0000"; +lastChange = "2021-12-06 20:36:30 +0000"; layers = ( { layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA"; @@ -126355,7 +126357,7 @@ nodes = ( ); } ); -width = 0; +width = 1200; }, { layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69"; @@ -128831,7 +128833,7 @@ lastChange = "2021-08-08 18:27:53 +0000"; layers = ( { layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA"; -width = 0; +width = 1200; }, { layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69"; diff --git a/clojure/fira_code/checks.clj b/clojure/fira_code/checks.clj index 0a052bc..0837d88 100644 --- a/clojure/fira_code/checks.clj +++ b/clojure/fira_code/checks.clj @@ -4,23 +4,20 @@ [fira-code.coll :as coll] [fira-code.glyphs :as glyphs])) - (defn width-ok? [w] (#{"0" 0 1200} w)) - (defn widths [font] (doseq [g (:glyphs font) :when (not= "0" (:export g)) - l (:layers g) - :let [w (:width l)] - :when (not (width-ok? w))] - (println (str "WARN glyph '" (:glyphname g) "' layer '" (:id (glyphs/layer l)) "' has width=" (pr-str w)))) + :let [[w & _ :as ws] (mapv :width (:layers g))]] + (when-not (apply = ws) + (println (str "WARN glyph '" (:glyphname g) "' has different widths=" (pr-str ws)))) + (when-not (width-ok? w) + (println (str "WARN glyph '" (:glyphname g) "' has unexpected width=" (pr-str w))))) font) - (defn -main [& args] (let [path (or (first args) "FiraCode.glyphs") font (glyphs/load path)] - (widths font))) - + (widths font))) \ No newline at end of file