Skip to content

Commit

Permalink
Merge pull request #16 from jublonet/master
Browse files Browse the repository at this point in the history
Add Fira Code, Input Mono, Support ligatures
  • Loading branch information
chrissimpkins authored Sep 20, 2017
2 parents c90153d + 838530a commit e93d8ab
Show file tree
Hide file tree
Showing 26 changed files with 118 additions and 1 deletion.
5 changes: 5 additions & 0 deletions hack/assets/css/playground.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,8 @@ body.vertical.fullscreen pre.playground {
font-size: 1.5em;
}
}

.ace_content {
font-feature-settings: "calt" 1; /* Enable ligatures for IE 10+, Edge */
text-rendering: optimizeLegibility; /* Force ligatures for Webkit, Blink, Gecko */
}
Binary file added hack/assets/fonts/fira-code/eot/FiraCode-Bold.eot
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
65 changes: 65 additions & 0 deletions hack/assets/fonts/fira-code/specimen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Fira Code Specimen</title>

<link rel="stylesheet" href="webfont.css">
<style>
body { font: 14px/1.5em "Fira Code"; }
.code {
font-feature-settings: "calt" 1; /* Enable ligatures for IE 10+, Edge */
text-rendering: optimizeLegibility; /* Force ligatures for Webkit, Blink, Gecko */
width: 30em;
margin: 5em auto;
white-space: pre-wrap;
word-break: break-all;
}
.light { font-weight: 300; }
.regular { font-weight: 400; }
.medium { font-weight: 500; }
.bold { font-weight: 700; }
i { font-style: normal; color: #c33; }
b { font-weight: inherit; color: #c33; }
</style>
<body>

<div class="code light"><b># Fira Code Light</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 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> []
| 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>
| 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>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
45 changes: 45 additions & 0 deletions hack/assets/fonts/fira-code/webfont.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* Source: https://github.com/tonsky/FiraCode */

@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('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('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('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;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion hack/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<!-- CSS Customization -->
<link rel="stylesheet" href="assets/css/custom.css">
<link rel="stylesheet" href="assets/css/playground.css">
<link rel="stylesheet" href="assets/css/playground.css?ver=20170919">
</head>

<!--
Expand Down Expand Up @@ -132,8 +132,10 @@ <h2>Font playground</h2>
<option data-href="https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released">Envy Code R</option>
<option data-href="https://github.com/belluzj/fantasque-sans">Fantasque Sans Mono</option>
<option data-href="http://mozilla.github.io/Fira/" data-webfont>Fira Mono</option>
<option data-href="http://mozilla.github.io/Fira/" data-webfont="custom">Fira Code</option>
<option data-href="https://github.com/i-tu/Hasklig/">Hasklig</option>
<option data-href="http://www.levien.com/type/myfonts/inconsolata.html" data-webfont>Inconsolata</option>
<option data-href="http://input.fontbureau.com/">Input Mono</option>
<option data-href="https://github.com/be5invis/iosevka">Iosevka</option>
<option data-href="https://fedorahosted.org/liberation-fonts/" data-webfont="custom">Liberation Mono</option>
<option data-href="https://www.microsoft.com/typography/fonts/family.aspx?FID=18">Lucida Console</option>
Expand Down

0 comments on commit e93d8ab

Please sign in to comment.