Skip to content

Instantly share code, notes, and snippets.

@Et7f3
Created May 9, 2019 01:49
Show Gist options
  • Save Et7f3/2fe447aaa8aba02e008a0af753b5c541 to your computer and use it in GitHub Desktop.
Save Et7f3/2fe447aaa8aba02e008a0af753b5c541 to your computer and use it in GitHub Desktop.
trying fira_code
<!DOCTYPE html>
<html>
<body>
<style>
/* CSS */
@import url(https://cdn.jsdelivr.net/gh/tonsky/[email protected]/distr/fira_code.css);
div {
/* Specify in CSS */
font-family: 'Fira Code', monospace;
}
</style>
<div id="e" style="font-family: monospace;">=><></div>
<p>
<script>
function myFunction(chk) {
var node = document.getElementById('e');
console.log(node, chk);
if (chk.checked)
node.style.fontFamily = "'Fira Code', monospace";
else
node.style.fontFamily = "monospace"
}
</script>
</p>
<p>ligature:<input type="checkbox" onclick="myFunction(this);" /></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment