This commit is contained in:
parent
85f4fec1da
commit
8edd0078a2
|
@ -53,14 +53,16 @@ All notable changes to this project will be documented in this file.
|
|||
- Added Forces `||-` ligature and U+22A2..U+22AF `⊢ ⊣ ⊤ ⊥ ⊦ ⊧ ⊨ ⊩ ⊪ ⊫ ⊬ ⊭ ⊮ ⊯` [#709]
|
||||
- Tuned `fl` and `fi` pairs [#795]
|
||||
- Disabled ligatures after regexp lookahead/lookbehinds `(?<=<` `(?<=>` `(?<==>` `(?<=|` `(?<==` `(?=:=` `(?=!=` `(?==` `(?===` `(?==>` `(?=>` `(?=>>` `(?=<<` `(?=/=` `(?!!` `(?!!.` `(?!=` `(?!==` `(?<!!` `(?<!!.` `(?<!=` `(?<!==` `(?<!--` [#578]
|
||||
- Removed ..= [#757]
|
||||
- Removed `..=` [#757]
|
||||
- Alternatives (stylistic sets):
|
||||
- Lowercase `r` (ss01) [#601]
|
||||
- `<=` `>=` (ss02) [#263] [#617]
|
||||
- Less than/greater than `<=` `>=` (ss02) [#263] [#617]
|
||||
- Ampersand `&` (ss03) [#617]
|
||||
- Dotted zero `0` (zero, ss04)
|
||||
- Dollar sign `$` (ss05) [#617]
|
||||
- At sign `@` (ss06) [#617] [#748] [#817]
|
||||
- Old-style figures (onum, ss07) [#561] [#715]
|
||||
- Old-style figures no longer prevent ligatures [#561] [#715]
|
||||
|
||||
|
||||
#### 1.207 (April 6, 2019)
|
||||
|
|
1230
FiraCode.glyphs
1230
FiraCode.glyphs
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
|||
(ns glyphs
|
||||
(:refer-clojure :exclude [load])
|
||||
(:require
|
||||
[clojure.java.io :as io]
|
||||
[clojure.string :as str]
|
||||
|
@ -128,6 +129,14 @@
|
|||
|
||||
; (-> (slurp "FiraCode.glyphs") parse serialize (->> (spit "FiraCode_saved.glyphs")))
|
||||
|
||||
(defn load [path]
|
||||
(println "Parsing" path "...")
|
||||
(parse (slurp path)))
|
||||
|
||||
(defn save! [path font]
|
||||
(println "Saving" path "...")
|
||||
(spit path (serialize font)))
|
||||
|
||||
(defn -main [& args]
|
||||
(let [font (-> (slurp "FiraCode.glyphs") parse)]
|
||||
(with-open [os (io/writer "clojure/FiraCode.edn")]
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
;; clj -m regen-calt
|
||||
|
||||
(ns regen-calt
|
||||
(:require
|
||||
[clojure.string :as str]
|
||||
|
@ -187,9 +189,8 @@
|
|||
:else (compare l1 l2)))
|
||||
|
||||
(defn -main [& args]
|
||||
(let [file (or (first args) "FiraCode.glyphs")
|
||||
_ (println "Parsing" file "...")
|
||||
font (glyphs/parse (slurp file))
|
||||
(let [path (or (first args) "FiraCode.glyphs")
|
||||
font (glyphs/load path)
|
||||
ligas (for [g (:glyphs font)
|
||||
:let [name (:glyphname g)]
|
||||
:when (str/ends-with? name ".liga")
|
||||
|
@ -199,8 +200,7 @@
|
|||
calt (->> ligas (remove manual?) (sort compare-ligas) (map liga->rule) (str/join "\n\n"))
|
||||
font' (replace-calt font calt)]
|
||||
|
||||
(println "Saving" file "...")
|
||||
(spit file (glyphs/serialize font'))
|
||||
(glyphs/save! path font')
|
||||
|
||||
(println "Total ligatures count:" (count ligas))
|
||||
(println " " (->> ligas
|
||||
|
@ -208,7 +208,4 @@
|
|||
(sort-by first)
|
||||
(map (fn [[k v]] (str (count v) (case k 2 " pairs", 3 " triples", 4 " quadruples"))))
|
||||
(str/join ", ")))
|
||||
(println)))
|
||||
|
||||
(-main)
|
||||
|
||||
(println)))
|
26
clojure/regen_classes.clj
Normal file
26
clojure/regen_classes.clj
Normal file
|
@ -0,0 +1,26 @@
|
|||
;; clj -m regen-classes
|
||||
|
||||
(ns regen-classes
|
||||
(:require
|
||||
[clojure.string :as str]
|
||||
[glyphs :as glyphs]
|
||||
[flatland.ordered.map :refer [ordered-map]]))
|
||||
|
||||
(defn -main [& args]
|
||||
(let [path (or (first args) "FiraCode.glyphs")
|
||||
font (glyphs/load path)
|
||||
not-spaces (->> (:glyphs font)
|
||||
(remove #(re-find #"^\.|space$|space\." (:glyphname %)))
|
||||
(remove #(= "0" (:export %))))
|
||||
_ (println "Generating class:NotSpace with" (count not-spaces) "glyphs")
|
||||
class (ordered-map
|
||||
:code (str/join " " (map :glyphname not-spaces))
|
||||
:name "NotSpace")
|
||||
classes (->> (:classes font)
|
||||
(remove #(= "NotSpace" (:name %)))
|
||||
(cons class))
|
||||
font' (assoc font :classes classes)
|
||||
_ (glyphs/save! path font')
|
||||
_ (println)]))
|
||||
|
||||
; (-main)
|
Loading…
Reference in a new issue