Font with Built-in Syntax Highlighting (2024)
Key topics
The font world just got a whole lot more interesting with the introduction of a font that comes with built-in syntax highlighting, sparking a lively debate about the merits of embedding scripts within fonts. Some commenters, like vbezhenar, questioned the logic of having a font with embedded scripts, while others, such as benrutter, pointed out that the motivation wasn't about reducing bloat, but rather about functionality without JavaScript. The discussion took a fascinating turn with references to llama.ttf, a font that embeds a large language model, and suggestions to embed a Z80 emulator within a font, highlighting the potential for creative and complex applications. As commenters weighed in, it became clear that this innovation has the potential to push the boundaries of what's possible with typography.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
2h
Peak period
36
Day 1
Avg / period
12.7
Based on 38 loaded comments
Key moments
- 01Story posted
Dec 23, 2025 at 5:28 AM EST
11 days ago
Step 01 - 02First comment
Dec 23, 2025 at 7:03 AM EST
2h after posting
Step 02 - 03Peak activity
36 comments in Day 1
Hottest window of the conversation
Step 03 - 04Latest activity
Jan 1, 2026 at 1:28 PM EST
1d ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
https://fuglede.github.io/llama.ttf
I took it to be along the lines of an "easier to work with" type motivation, rather than reducing package sizes.
https://github.com/nevesnunes/z80-sans
So, you could absolutely write a WASM Z80 emulator and embed it in a font. Whether or not you could make it do anything useful, or how strong your grip on reality would remain after? I don't know.
But it wasn't like you were doing anything else on the days between Christmas and New Year, right?
[1] https://fuglede.github.io/llama.ttf/
Copy pasting from IntelliJ does give colours but none of the other niceties such as kerning or litigation. Screenshots are nice visually but a pain to maintain.
> It only works where OpenType is supported. Fortunately, that's all major browsers and most modern programs. However, something like PowerPoint doesn't support OpenType.
Is kerning a thing for monospace fonts?
I think there is still some kerning going on where the individual letters are placed closer together and the entire word has the same width so more spacing in between words.
I have yet to see a good web based text editor with syntax highlighting. They all mess with the native search functionality of the browser. Because they can't just use a textarea for the edit area. With this approach, it would be possible.
I wonder how usable a Python version of this would be?
I slightly expect you to pull a "no true Scotsman" here and suggest it's actually no good because it doesn't really support mobile browsers very well, but Microsoft's Monaco editor that's driven from VS Code is quite good. https://microsoft.github.io/monaco-editor/
When I hit ctrl+f on that page and type "export":
First it says "1 of 4 matches" but nothing is highlighted.
When I hit enter, it says "2 of 4 matches" and again, nothing is highlighted.
When I hit enter again, it says "3 of 4 matches" and the first match is highlighted.
When I hit enter again, it says "4 of 4 matches" and the second match is highlighted.
But then why does the color disappear if I disallow scripts on this page? Are you using JS to load the font in? (if so... why? Web fonts don't need JS to load)
Which doesn't work without JS. So adding the @font-face to the page itself, so that things works even without JS, would be lovely.
665 points | 137 comments
https://news.ycombinator.com/item?id=41245159
The whole post proves the opposite is true!
This is a blocker for my applications.
Interesting indeed! This bit feels like a neat bit of hackery to keep in my back pocket for sure.