Browse Source

Added SemiBold weight (closes #987)

Nikita Prokopov 5 years ago
parent
commit
2a88d87bd5

File diff suppressed because it is too large
+ 1 - 1
FiraCode.glyphs


+ 41 - 30
clojure/fira_code/calt.clj

@@ -16,6 +16,7 @@
    ["parenleft" "question" "exclam"]
    ["parenleft" "question" "less" "exclam"]])
 
+
 (defn gen-ignore-prefixes [liga]
   (str/join
     (for [prefix ignore-prefixes
@@ -28,6 +29,7 @@
         " " (str/join " " (drop 1 liga))
         ";\n"))))
 
+
 (def ignores
   { ["slash" "asterisk"]
     (str
@@ -113,6 +115,7 @@
     "  ignore sub bar hyphen' bar;\n"
 })
 
+
 ;; DO NOT generate ignores at all
 (def skip-ignores? #{
   ;; #410 <<*>> <<+>> <<$>>
@@ -123,6 +126,7 @@
   ["f" "l"] ["F" "l"] ["T" "l"]
 })
 
+
 ;; DO NOT generate ligature
 (def manual? #{
   ;; /\ \/
@@ -130,6 +134,7 @@
   ["backslash" "slash"]
 })
 
+
 (defn liga->rule
   "[f f i] => { [LIG LIG i] f_f_i.liga
                 [LIG   f i] LIG
@@ -138,42 +143,48 @@
   (case (count liga)
     2 (let [[a b] liga]
         (str/replace
-          (str "lookup 1_2 {\n"
-               (when-not (skip-ignores? liga)
-                 (str "  ignore sub 1 1' 2;\n"
-                      "  ignore sub 1' 2 2;\n"))
-               (gen-ignore-prefixes liga)
-               (get ignores liga)
-               "  sub 1.spacer 2' by 1_2.liga;\n"
-               "  sub 1'       2  by 1.spacer;\n"
-               "} 1_2;")
+          (str
+            "lookup 1_2 {\n"
+            (when-not (skip-ignores? liga)
+              (str "  ignore sub 1 1' 2;\n"
+                   "  ignore sub 1' 2 2;\n"))
+            (gen-ignore-prefixes liga)
+            (get ignores liga)
+            "  sub 1.spacer 2' by 1_2.liga;\n"
+            "  sub 1'       2  by 1.spacer;\n"
+            ; "sub 1 2 by 1_2.liga;"
+            "} 1_2;")
           #"\d" {"1" a "2" b}))
     3 (let [[a b c] liga]
         (str/replace
-          (str "lookup 1_2_3 {\n"
-               (when-not (skip-ignores? liga)
-                (str "  ignore sub 1 1' 2 3;\n"
-                     "  ignore sub 1' 2 3 3;\n"))
-               (gen-ignore-prefixes liga)
-               (get ignores liga)
-               "  sub 1.spacer 2.spacer 3' by 1_2_3.liga;\n"
-               "  sub 1.spacer 2'       3  by 2.spacer;\n"
-               "  sub 1'       2        3  by 1.spacer;\n"
-               "} 1_2_3;")
+          (str
+            "lookup 1_2_3 {\n"
+            (when-not (skip-ignores? liga)
+             (str "  ignore sub 1 1' 2 3;\n"
+                  "  ignore sub 1' 2 3 3;\n"))
+            (gen-ignore-prefixes liga)
+            (get ignores liga)
+            "  sub 1.spacer 2.spacer 3' by 1_2_3.liga;\n"
+            "  sub 1.spacer 2'       3  by 2.spacer;\n"
+            "  sub 1'       2        3  by 1.spacer;\n"
+            ; "sub 1 2 3 by 1_2_3.liga;"
+            "} 1_2_3;")
           #"\d" {"1" a "2" b "3" c}))
     4 (let [[a b c d] liga]
         (str/replace
-          (str "lookup 1_2_3_4 {\n"
-               (when-not (skip-ignores? liga)
-                 (str "  ignore sub 1 1' 2 3 4;\n"
-                      "  ignore sub 1' 2 3 4 4;\n"))
-               (gen-ignore-prefixes liga)
-               (get ignores liga)
-               "  sub 1.spacer 2.spacer 3.spacer 4' by 1_2_3_4.liga;\n"
-               "  sub 1.spacer 2.spacer 3'       4  by 3.spacer;\n"
-               "  sub 1.spacer 2'       3        4  by 2.spacer;\n"
-               "  sub 1'       2        3        4  by 1.spacer;\n"
-               "} 1_2_3_4;")
+          (str
+            "lookup 1_2_3_4 {\n"
+            (when-not (skip-ignores? liga)
+              (str "  ignore sub 1 1' 2 3 4;\n"
+                   "  ignore sub 1' 2 3 4 4;\n"))
+            (gen-ignore-prefixes liga)
+            (get ignores liga)
+            "  sub 1.spacer 2.spacer 3.spacer 4' by 1_2_3_4.liga;\n"
+            "  sub 1.spacer 2.spacer 3'       4  by 3.spacer;\n"
+            "  sub 1.spacer 2'       3        4  by 2.spacer;\n"
+            "  sub 1'       2        3        4  by 1.spacer;\n"
+            ; "sub 1 2 3 4 by 1_2_3_4.liga;"
+            "} 1_2_3_4;")
           #"\d" {"1" a "2" b "3" c "4" d}))))
 
 

+ 8 - 0
distr/fira_code.css

@@ -22,6 +22,14 @@
   font-style: normal;
 }
 
+@font-face {
+  font-family: 'Fira Code';
+  src: url('woff2/FiraCode-SemiBold.woff2') format('woff2'),
+    url("woff/FiraCode-SemiBold.woff") format("woff");
+  font-weight: 600;
+  font-style: normal;
+}
+
 @font-face {
   font-family: 'Fira Code';
   src: url('woff2/FiraCode-Bold.woff2') format('woff2'),

+ 11 - 0
distr/specimen.html

@@ -19,6 +19,7 @@
     .light { font-weight: 300; }
     .regular { font-weight: 400; }
     .medium { font-weight: 500; }
+    .semibold { font-weight: 600; }
     .bold { font-weight: 700; }
     .variable { font-family: 'Fira Code VF'; font-variation-settings: 'wght' 400; }
     i { font-style: normal; color: #c33; }
@@ -63,6 +64,16 @@ take = (n, [x, <i>...</i>xs]:list) <i>--></i>
 last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
 
 
+<div class="code semibold"><b># Fira Code Medium</b>
+
+take = (n, [x, <i>...</i>xs]:list) <i>--></i>
+  | n <i><=</i> 0     <i>=></i> []
+  | empty list <i>=></i> []
+  | otherwise  <i>=></i> [x] <i>++</i> take n-1, xs
+
+last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
+
+
 <div class="code bold"><b># Fira Code Bold</b>
 
 take = (n, [x, <i>...</i>xs]:list) <i>--></i>

BIN
distr/ttf/FiraCode-Bold.ttf


BIN
distr/ttf/FiraCode-Light.ttf


BIN
distr/ttf/FiraCode-Medium.ttf


BIN
distr/ttf/FiraCode-Regular.ttf


BIN
distr/ttf/FiraCode-Retina.ttf


BIN
distr/ttf/FiraCode-SemiBold.ttf


Some files were not shown because too many files changed in this diff