Skip to content

Instantly share code, notes, and snippets.

@rossja
Created September 10, 2024 00:33
Show Gist options
  • Save rossja/9896bb1ec586d823261660c091f0a6da to your computer and use it in GitHub Desktop.
Save rossja/9896bb1ec586d823261660c091f0a6da to your computer and use it in GitHub Desktop.
web font with built-in color syntax highlighting
<html>
<!--
// neat font for syntax highlighting. see https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/
// font download at https://blog.glyphdrawing.club/assets/fonts/FontWithASyntaxHighlighter-Regular.woff2
-->
<head>
<style type="text/css">
@font-face {
font-family: 'FontWithASyntaxHighlighter';
src:
url('./FontWithASyntaxHighlighter-Regular.woff2')
format('woff2')
;
}
body {
background-color: #000;
color: #ccc;
}
#main {
margin: auto;
width: 80%;
}
pre {
font-family: "FontWithASyntaxHighlighter", monospace;
font-size: small;
width: 50%;
border: 1px solid #ccc;
background-color: #333;
padding: 1em;
}
</style>
</head>
<body>
<div id="main">
<h1>colr-syntax font</h1>
<pre>
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
</pre>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment