kopia lustrzana https://github.com/tonsky/FiraCode
Enhance conciseness
rodzic
c94f7aeb70
commit
8488f41f0b
|
@ -2,22 +2,17 @@
|
||||||
(:require
|
(:require
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[fira-code.glyphs :as glyphs]
|
[fira-code.glyphs :as glyphs]
|
||||||
[fira-code.time :as time]
|
[fira-code.time :as time]))
|
||||||
[flatland.ordered.map :refer [ordered-map]]))
|
|
||||||
|
|
||||||
|
|
||||||
(defn spacer [name]
|
(defn spacer [name]
|
||||||
(ordered-map
|
{:color 3
|
||||||
:color 3,
|
:glyphname name
|
||||||
:glyphname name,
|
:lastChange (time/now-str)
|
||||||
:lastChange (time/now-str),
|
:layers [{:layerId (:Light glyphs/weights) :width 1200}
|
||||||
:layers
|
{:layerId (:Bold glyphs/weights) :width 1200}]})
|
||||||
[(ordered-map :layerId (:Light glyphs/weights), :width 1200)
|
|
||||||
(ordered-map :layerId (:Bold glyphs/weights), :width 1200)]))
|
|
||||||
|
|
||||||
|
(defn add-spacers [font ligature-names]
|
||||||
(defn add-spacers [font ligas]
|
(let [needed (->> (into #{} cat ligature-names)
|
||||||
(let [needed (->> (into #{} cat ligas)
|
|
||||||
(map #(str % ".spacer")))
|
(map #(str % ".spacer")))
|
||||||
existing (->> (:glyphs font)
|
existing (->> (:glyphs font)
|
||||||
(map :glyphname)
|
(map :glyphname)
|
||||||
|
@ -28,4 +23,4 @@
|
||||||
(do
|
(do
|
||||||
(println " added glyphs: " (str/join " " new))
|
(println " added glyphs: " (str/join " " new))
|
||||||
(update font :glyphs #(into % (map spacer new))))
|
(update font :glyphs #(into % (map spacer new))))
|
||||||
font)))
|
font)))
|
||||||
|
|
Ładowanie…
Reference in New Issue