-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Equal-based arrows #346, substitute features from *.fea files
- Loading branch information
Showing
12 changed files
with
2,881 additions
and
1,133 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(ns fira-code.features | ||
(:require | ||
[clojure.java.io :as io] | ||
[clojure.string :as str] | ||
[fira-code.glyphs :as glyphs])) | ||
|
||
|
||
(defn append-features [font] | ||
(let [features (->> (file-seq (io/file "features")) | ||
(filter #(str/ends-with? (.getName %) ".fea")) | ||
(sort-by #(.getName %)) | ||
(map slurp) | ||
(map str/trim) | ||
(str/join "\n\n"))] | ||
(glyphs/update-code font :features "calt" | ||
#(str % "\n\n" features)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
### Arbitrary-length arrows #346 | ||
|
||
lookup arrows { | ||
# continue hyphen | ||
sub [less_start.arw less_less_start.arw less_middle.arw less_less_middle.arw greater_start.arw greater_greater_start.arw greater_middle.arw greater_greater_middle.arw bar_start.arw bar_bar_start.arw bar_middle.arw bar_bar_middle.arw hyphen_start.arw hyphen_end.arw] hyphen' by hyphen_end.arw; | ||
|
||
# double middles | ||
sub [hyphen_start.arw hyphen_end.arw] less.spacer less' hyphen by less_less_middle.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] less' less hyphen by less.spacer; | ||
sub [hyphen_start.arw hyphen_end.arw] greater.spacer greater' hyphen by greater_greater_middle.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] greater' greater hyphen by greater.spacer; | ||
sub [hyphen_start.arw hyphen_end.arw] bar.spacer bar' hyphen by bar_bar_middle.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] bar' bar hyphen by bar.spacer; | ||
|
||
# single middles | ||
sub [hyphen_start.arw hyphen_end.arw] less' hyphen by less_middle.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] greater' hyphen by greater_middle.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] bar' hyphen by bar_middle.arw; | ||
|
||
# double ends | ||
sub [hyphen_start.arw hyphen_end.arw] less.spacer less' by less_less_end.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] less' less by less.spacer; | ||
sub [hyphen_start.arw hyphen_end.arw] greater.spacer greater' by greater_greater_end.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] greater' greater by greater.spacer; | ||
sub [hyphen_start.arw hyphen_end.arw] bar.spacer bar' by bar_bar_end.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] bar' bar by bar.spacer; | ||
|
||
# single ends | ||
sub [hyphen_start.arw hyphen_end.arw] less' by less_end.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] greater' by greater_end.arw; | ||
sub [hyphen_start.arw hyphen_end.arw] bar' by bar_end.arw; | ||
|
||
# double beginnings | ||
sub less.spacer less' hyphen by less_less_start.arw; | ||
sub less' less hyphen by less.spacer; | ||
sub greater.spacer greater' hyphen by greater_greater_start.arw; | ||
sub greater' greater hyphen by greater.spacer; | ||
sub bar.spacer bar' hyphen by bar_bar_start.arw; | ||
sub bar' bar hyphen by bar.spacer; | ||
|
||
# single beginnings | ||
sub less' hyphen by less_start.arw; | ||
sub greater' hyphen by greater_start.arw; | ||
sub bar' hyphen by bar_start.arw; | ||
sub hyphen' [hyphen less greater bar] by hyphen_start.arw; | ||
} arrows; | ||
|
||
lookup double_arrows { | ||
# Disable >=< #548 | ||
# ignore sub greater' equal less; | ||
# ignore sub greater equal' less; | ||
# ignore sub greater equal less'; | ||
|
||
# continue hyphen | ||
sub [less_start.darw less_less_start.darw less_middle.darw less_less_middle.darw greater_start.darw greater_greater_start.darw greater_middle.darw greater_greater_middle.darw bar_start.darw bar_bar_start.darw bar_middle.darw bar_bar_middle.darw equal_start.darw equal_end.darw] equal' by equal_end.darw; | ||
|
||
# double middles | ||
sub [equal_start.darw equal_end.darw] less.spacer less' equal by less_less_middle.darw; | ||
sub [equal_start.darw equal_end.darw] less' less equal by less.spacer; | ||
sub [equal_start.darw equal_end.darw] greater.spacer greater' equal by greater_greater_middle.darw; | ||
sub [equal_start.darw equal_end.darw] greater' greater equal by greater.spacer; | ||
sub [equal_start.darw equal_end.darw] bar.spacer bar' equal by bar_bar_middle.darw; | ||
sub [equal_start.darw equal_end.darw] bar' bar equal by bar.spacer; | ||
|
||
# single middles | ||
sub [equal_start.darw equal_end.darw] less' equal by less_middle.darw; | ||
sub [equal_start.darw equal_end.darw] greater' equal by greater_middle.darw; | ||
sub [equal_start.darw equal_end.darw] bar' equal by bar_middle.darw; | ||
|
||
# double ends | ||
sub [equal_start.darw equal_end.darw] less.spacer less' by less_less_end.darw; | ||
sub [equal_start.darw equal_end.darw] less' less by less.spacer; | ||
sub [equal_start.darw equal_end.darw] greater.spacer greater' by greater_greater_end.darw; | ||
sub [equal_start.darw equal_end.darw] greater' greater by greater.spacer; | ||
sub [equal_start.darw equal_end.darw] bar.spacer bar' by bar_bar_end.darw; | ||
sub [equal_start.darw equal_end.darw] bar' bar by bar.spacer; | ||
|
||
# single ends | ||
sub [equal_start.darw equal_end.darw] less' by less_end.darw; | ||
sub [equal_start.darw equal_end.darw] greater' by greater_end.darw; | ||
sub [equal_start.darw equal_end.darw] bar' by bar_end.darw; | ||
|
||
# double beginnings | ||
sub less.spacer less' equal by less_less_start.darw; | ||
sub less' less equal by less.spacer; | ||
sub greater.spacer greater' equal by greater_greater_start.darw; | ||
sub greater' greater equal by greater.spacer; | ||
sub bar.spacer bar' equal by bar_bar_start.darw; | ||
sub bar' bar equal by bar.spacer; | ||
|
||
# single beginnings | ||
sub less' equal by less_start.darw; | ||
sub greater' equal by greater_start.darw; | ||
sub bar' equal by bar_start.darw; | ||
sub equal' [equal less greater bar] by equal_start.darw; | ||
} double_arrows; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### Lowercase/uppercase operators | ||
|
||
lookup lowercase_hyphen { | ||
ignore sub @Tall \hyphen' @Lowercase; | ||
ignore sub @Lowercase \hyphen' @Tall; | ||
sub \hyphen' @Lowercase by \hyphen.lc; | ||
sub @Lowercase \hyphen' by \hyphen.lc; | ||
} lowercase_hyphen; | ||
|
||
lookup lowercase_plus { | ||
ignore sub @Tall \plus' @Lowercase; | ||
ignore sub @Lowercase \plus' @Tall; | ||
sub \plus' @Lowercase by \plus.lc; | ||
sub @Lowercase \plus' by \plus.lc; | ||
} lowercase_plus; | ||
|
||
lookup lowercase_asterisk { | ||
ignore sub @Tall \asterisk' @Lowercase; | ||
ignore sub @Lowercase \asterisk' @Tall; | ||
sub \asterisk' @Lowercase by \asterisk.lc; | ||
sub @Lowercase \asterisk' by \asterisk.lc; | ||
} lowercase_asterisk; | ||
|
||
lookup uppercase_colon { | ||
ignore sub @Tall \colon' @Lowercase; | ||
ignore sub @Lowercase \colon' @Tall; | ||
sub @Tall \colon' by \colon.uc; | ||
sub \colon' @Tall by \colon.uc; | ||
# pos @Tall \colon' <0 160 0 0>; | ||
# pos \colon' @Tall <0 160 0 0>; | ||
} uppercase_colon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### Logical conjuntion/disjunction #738 | ||
|
||
lookup slash_backslash { | ||
ignore sub @NotSpace slash' backslash; | ||
ignore sub slash' backslash @NotSpace; | ||
sub slash.spacer backslash' by slash_backslash.liga; | ||
sub slash' backslash by slash.spacer; | ||
} slash_backslash; | ||
|
||
lookup backslash_slash { | ||
ignore sub @NotSpace backslash' slash; | ||
ignore sub backslash' slash @NotSpace; | ||
sub backslash.spacer slash' by backslash_slash.liga; | ||
sub backslash' slash by backslash.spacer; | ||
} backslash_slash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### 0xFF | ||
sub [zero zero.zero] x' [@Digit @HexDigit] by x.multiply; | ||
sub [zero.tosf zero.zero.tosf zero.tosf.zero] x' [@DigitTosf @HexDigit] by x.multiply.tosf; | ||
|
||
### 800x600 | ||
sub @Digit x' @Digit by x.multiply; | ||
sub @DigitTosf x' @DigitTosf by x.multiply.tosf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### fi/fl #795 | ||
|
||
sub [f i.salt_low j.salt_low] [i j]' by [i.salt_low j.salt_low]; | ||
sub [F T I l.salt_low] l' by l.salt_low; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Greek | ||
|
||
lookup caltGreekUCdiph { | ||
sub @GreekUCdiphIOTA Iota' by Iotadieresis; | ||
sub @GreekUCdiphUPSILON Upsilon' by Upsilondieresis; | ||
} caltGreekUCdiph; | ||
|
||
lookup caltGreekUC { | ||
sub @GreekUCAcc' @GreekUC by @GreekUCcalt; | ||
sub @GreekUC @GreekUCAcc' by @GreekUCcalt; | ||
sub @GreekUCAcc' space @GreekUC by @GreekUCcalt; | ||
sub @GreekUC space @GreekUCAcc' by @GreekUCcalt; | ||
} caltGreekUC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sub less asciitilde' greater by asciitilde_asciitilde.liga; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters