1
0
Fork 0
mirror of synced 2024-05-17 11:03:33 +12:00

Version 1.100

This commit is contained in:
Nikita Prokopov 2015-12-19 23:26:39 +06:00
parent 22e3e2f98e
commit 6333e8954d
16 changed files with 483 additions and 87 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.zip
Fira Code_liga.glyphs

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@
<img src="https://dl.dropboxusercontent.com/u/561580/imgs/fira_code_logo.svg">
#### [Download Fira Code v1.000](https://github.com/tonsky/FiraCode/releases/download/1.000/FiraCode_1.000.zip)
#### [Download Fira Code v1.100](https://github.com/tonsky/FiraCode/releases/download/1.100/FiraCode_1.100.zip)
### Problem
@ -96,6 +96,12 @@ Thanks Georg Seifert for providing a [Glyphs 2](https://glyphsapp.com) license.
### Changelog
#### 1.100
- Fixed calt table conflicts (`----` would incorrectly render as `<!--`)
- Added centered `:` (between digits, e.g. `10:40`)
- Added lowercase-aligned `-`, `*` and `+` (only between lowercase letters, e.g. kebab case `var-name`, pointers `*ptr` etc)
#### 1.000
@ -114,7 +120,7 @@ Added:
`<->` `<~~` `<~` `~~~` `~>` `~~>`
`<$` `<+` `<*` `*>` `+>` `$>`
`;;;` `:::` `!!!` `???` `%%` `%%%` `##` `###` `####`
`.-` `#_(` `=<` `**/` `0x` `www` `[]`
`.-` `#_(` `=<` `**/` `0x` `www` `[]`
Redrawn:

View file

@ -51,6 +51,23 @@
[ a b c d] CR})))
(defn any? [p & colls]
(if colls
(let [[coll & cs] colls]
(some #(apply any? (partial p %) cs) coll))
(p)))
(defn conflicts? [r1 r2]
(when (.startsWith (first r2) "CR.") ;; we accept that higher-len ligatures can override lower-length
;; but once replacement has started (first glyph in rule is CR.*)
;; there should be no possibility for conflits
(let [l1 (count r1)
l2 (count r2)
prefix1 (subvec r1 0 l2)]
(= r2 prefix1))))
(def all-rules
(reduce
(fn [generated liga]
@ -59,12 +76,13 @@
;; with any of previous rules
(some (fn [i]
(let [CR (str "CR." (String/format "%02d" (to-array [i])))
rs (liga->rules liga CR)]
(when-not (some generated (keys rs))
rs (liga->rules liga CR)]
; (println (keys generated) (keys rs))
(when-not (any? conflicts? (keys generated) (keys rs))
rs)))
(range))))
{}
ligas))
(->> ligas (sort-by count) reverse)))
(defn priority-fn [[from to]]
@ -76,16 +94,8 @@
(into from (repeat (- 4 (count from)) "z"))])
(defn replace-keys [replacements coll]
(reduce (fn [result [k v]]
(conj result [(or (replacements k) k) v]))
(empty coll) coll))
(def table (->> all-rules
(sort-by priority-fn)
vec
(replace-keys {["zero" "x"] ["zero" "x" "@HexDigit"]})))
(sort-by priority-fn)))
(defn rule->str [[from to]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

View file

@ -15,15 +15,17 @@
\\ \\\ {- -} // ///
/* /** **/ */
</ <!-- --> />
0xF www []
</ <!-- www --> />
0xF 9:45 m-x *ptr
;; ;;; :: ::: !! !!!
?? ??? %% %%% && &&&
|| ||| .. ... ..<
|| ||| .. ... ..< []
-- --- ++ +++ ** ***
~= ~- -~ =~ ~@
^= ?= /= /== |= ||=
## ### ####
#{ #[ #( #? #_ #_(
#{ #[ #( #? #_ #_(