Skip to content

Commit 6e5ddfe

Browse files
committed
(hopefully) fixed monospaced #1325
1 parent 16b04e0 commit 6e5ddfe

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

FiraCode.glyphs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
.appVersion = "3091";
33
DisplayStrings = (
4-
".-\012.=\012:-\012:="
4+
"/fraction",
5+
"/uniE000/uniE001/uniE002/uniE003",
6+
"/null"
57
);
68
classes = (
79
{
@@ -62048,7 +62050,7 @@ unicode = 2079;
6204862050
{
6204962051
color = 3;
6205062052
glyphname = fraction;
62051-
lastChange = "2021-08-08 18:27:52 +0000";
62053+
lastChange = "2021-12-06 20:35:57 +0000";
6205262054
layers = (
6205362055
{
6205462056
layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA";
@@ -62063,7 +62065,7 @@ nodes = (
6206362065
);
6206462066
}
6206562067
);
62066-
width = 0;
62068+
width = 1200;
6206762069
},
6206862070
{
6206962071
layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69";
@@ -125172,7 +125174,7 @@ nodes = (
125172125174
);
125173125175
}
125174125176
);
125175-
width = 0;
125177+
width = 1200;
125176125178
},
125177125179
{
125178125180
layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69";
@@ -125597,7 +125599,7 @@ unicode = E000;
125597125599
},
125598125600
{
125599125601
glyphname = uniE001;
125600-
lastChange = "2021-08-08 18:27:53 +0000";
125602+
lastChange = "2021-12-06 20:36:30 +0000";
125601125603
layers = (
125602125604
{
125603125605
layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA";
@@ -125900,7 +125902,7 @@ nodes = (
125900125902
);
125901125903
}
125902125904
);
125903-
width = 0;
125905+
width = 1200;
125904125906
},
125905125907
{
125906125908
layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69";
@@ -126210,7 +126212,7 @@ unicode = E001;
126210126212
},
126211126213
{
126212126214
glyphname = uniE002;
126213-
lastChange = "2021-08-08 18:27:53 +0000";
126215+
lastChange = "2021-12-06 20:36:30 +0000";
126214126216
layers = (
126215126217
{
126216126218
layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA";
@@ -126355,7 +126357,7 @@ nodes = (
126355126357
);
126356126358
}
126357126359
);
126358-
width = 0;
126360+
width = 1200;
126359126361
},
126360126362
{
126361126363
layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69";
@@ -128831,7 +128833,7 @@ lastChange = "2021-08-08 18:27:53 +0000";
128831128833
layers = (
128832128834
{
128833128835
layerId = "4B7A3BAF-EAD8-4024-9BEA-BB1DE86CFCFA";
128834-
width = 0;
128836+
width = 1200;
128835128837
},
128836128838
{
128837128839
layerId = "B67F0F2D-EC95-4CB8-966E-23AE86958A69";

clojure/fira_code/checks.clj

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,20 @@
44
[fira-code.coll :as coll]
55
[fira-code.glyphs :as glyphs]))
66

7-
87
(defn width-ok? [w]
98
(#{"0" 0 1200} w))
109

11-
1210
(defn widths [font]
1311
(doseq [g (:glyphs font)
1412
:when (not= "0" (:export g))
15-
l (:layers g)
16-
:let [w (:width l)]
17-
:when (not (width-ok? w))]
18-
(println (str "WARN glyph '" (:glyphname g) "' layer '" (:id (glyphs/layer l)) "' has width=" (pr-str w))))
13+
:let [[w & _ :as ws] (mapv :width (:layers g))]]
14+
(when-not (apply = ws)
15+
(println (str "WARN glyph '" (:glyphname g) "' has different widths=" (pr-str ws))))
16+
(when-not (width-ok? w)
17+
(println (str "WARN glyph '" (:glyphname g) "' has unexpected width=" (pr-str w)))))
1918
font)
2019

21-
2220
(defn -main [& args]
2321
(let [path (or (first args) "FiraCode.glyphs")
2422
font (glyphs/load path)]
25-
(widths font)))
26-
23+
(widths font)))

0 commit comments

Comments
 (0)