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