Browse Source

Removed eot and woff, added variable font to specimen

Nikita Prokopov 6 years ago
parent
commit
182470b88f

+ 2 - 1
.gitignore

@@ -7,4 +7,5 @@ FiraCode\ (Autosaved).glyphs
 .cpcache
 master_ufo
 instance_ufo
-venv
+venv
+.DS_Store

BIN
distr/eot/FiraCode-Bold.eot


BIN
distr/eot/FiraCode-Light.eot


BIN
distr/eot/FiraCode-Medium.eot


BIN
distr/eot/FiraCode-Regular.eot


+ 25 - 36
distr/fira_code.css

@@ -1,43 +1,32 @@
-@font-face{
-    font-family: 'Fira Code';
-    src: url('eot/FiraCode-Light.eot');
-    src: url('eot/FiraCode-Light.eot') format('embedded-opentype'),
-         url('woff2/FiraCode-Light.woff2') format('woff2'),
-         url('woff/FiraCode-Light.woff') format('woff'),
-         url('ttf/FiraCode-Light.ttf') format('truetype');
-    font-weight: 300;
-    font-style: normal;
+@font-face {
+  font-family: 'Fira Code';
+  src: url('woff2/FiraCode-Light.woff2') format('woff2');
+  font-weight: 300;
+  font-style: normal;
 }
 
-@font-face{
-    font-family: 'Fira Code';
-    src: url('eot/FiraCode-Regular.eot');
-    src: url('eot/FiraCode-Regular.eot') format('embedded-opentype'),
-         url('woff2/FiraCode-Regular.woff2') format('woff2'),
-         url('woff/FiraCode-Regular.woff') format('woff'),
-         url('ttf/FiraCode-Regular.ttf') format('truetype');
-    font-weight: 400;
-    font-style: normal;
+@font-face {
+  font-family: 'Fira Code';
+  src: url('woff2/FiraCode-Regular.woff2') format('woff2');
+  font-weight: 400;
+  font-style: normal;
 }
 
-@font-face{
-    font-family: 'Fira Code';
-    src: url('eot/FiraCode-Medium.eot');
-    src: url('eot/FiraCode-Medium.eot') format('embedded-opentype'),
-         url('woff2/FiraCode-Medium.woff2') format('woff2'),
-         url('woff/FiraCode-Medium.woff') format('woff'),
-         url('ttf/FiraCode-Medium.ttf') format('truetype');
-    font-weight: 500;
-    font-style: normal;
+@font-face {
+  font-family: 'Fira Code';
+  src: url('woff2/FiraCode-Medium.woff2') format('woff2');
+  font-weight: 500;
+  font-style: normal;
 }
 
-@font-face{
-    font-family: 'Fira Code';
-    src: url('eot/FiraCode-Bold.eot');
-    src: url('eot/FiraCode-Bold.eot') format('embedded-opentype'),
-         url('woff2/FiraCode-Bold.woff2') format('woff2'),
-         url('woff/FiraCode-Bold.woff') format('woff'),
-         url('ttf/FiraCode-Bold.ttf') format('truetype');
-    font-weight: 700;
-    font-style: normal;
+@font-face {
+  font-family: 'Fira Code';
+  src: url('woff2/FiraCode-Bold.woff2') format('woff2');
+  font-weight: 700;
+  font-style: normal;
+}
+
+@font-face {
+  font-family: 'Fira Code VF';
+  src: url('variable_ttf/FiraCode-VF.ttf') format('truetype');
 }

+ 22 - 3
distr/specimen.html

@@ -20,9 +20,17 @@
     .regular { font-weight: 400; }
     .medium { font-weight: 500; }
     .bold { font-weight: 700; }
+    .variable { font-family: 'Fira Code VF'; font-variation-settings: 'wght' 400; }
     i { font-style: normal; color: #c33; }
     b { font-weight: inherit; color: #c33; }
   </style>
+  <script type="text/javascript">
+    function onWeightChange(weight) {
+      // code_variable.style['font-weight'] = weight;
+      code_variable.style['font-variation-settings'] = "'wght' " + weight;
+      span_wght.innerText = weight;
+    }
+  </script>
 <body>
 
 <div class="code light"><b># Fira Code Light</b>
@@ -35,7 +43,17 @@ take = (n, [x, <i>...</i>xs]:list) <i>--></i>
 last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
 
 
-    <div class="code regular"><b># Fira Code Regular</b>
+<div class="code regular"><b># Fira Code Regular</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 medium"><b># Fira Code Medium</b>
 
 take = (n, [x, <i>...</i>xs]:list) <i>--></i>
   | n <i><=</i> 0     <i>=></i> []
@@ -45,7 +63,7 @@ take = (n, [x, <i>...</i>xs]:list) <i>--></i>
 last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
 
 
-    <div class="code medium"><b># Fira Code Medium</b>
+<div class="code bold"><b># Fira Code Bold</b>
 
 take = (n, [x, <i>...</i>xs]:list) <i>--></i>
   | n <i><=</i> 0     <i>=></i> []
@@ -54,8 +72,9 @@ take = (n, [x, <i>...</i>xs]:list) <i>--></i>
 
 last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
 
+<div id="code_variable" class="code variable"><b># Fira Code Variable</b>
 
-    <div class="code bold"><b># Fira Code Bold</b>
+<input type="range" min="300" max="700" value="400" step="10" style="width: 300px;" oninput="onWeightChange(this.value)" onchange="onWeightChange(this.value)"> <span id="span_wght">400</span>
 
 take = (n, [x, <i>...</i>xs]:list) <i>--></i>
   | n <i><=</i> 0     <i>=></i> []

BIN
distr/woff/FiraCode-Bold.woff


BIN
distr/woff/FiraCode-Light.woff


BIN
distr/woff/FiraCode-Medium.woff


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