News for hackers. Stuff that matters.
Re:Show HN: Z80 Sans by hyperhello on Monday August 26, 2024 @01:46AM (#41354352)
"A recursive descent parser is used to generate all possible glyphs, which helps with evaluating expressions in encodings (e.g. SET b,(IX+o) takes a bit and a displacement, encoded as expression DD CB o C6+8*b). These encodings were then expanded to all possible values that operands can take, before finally associating 1 or more hexadecimal bytes to each disassembly glyph required to render an expanded instruction."

That's just evil! Great job!

Re:Show HN: Z80 Sans by 1GZ0 on Monday August 26, 2024 @05:50AM (#41355536)
Every day I'm amazed at what OpenType fonts can do on their own. Material Design icons font, fonts with built-in syntax highlighting and now this.
Re:Show HN: Z80 Sans by layer8 on Monday August 26, 2024 @07:54AM (#41356269)
Read this, and you won't be surprised anymore about what is and isn't possible: https://simoncozens.github.io/fonts-and-layout/features-2.ht... (and preceding chapters)
Re:Show HN: Z80 Sans by rbanffy on Monday August 26, 2024 @07:18AM (#41356070)
I am equally amazed and horrified. Fonts shouldn't do that. ;-)
Re:Show HN: Z80 Sans by tambourine_man on Monday August 26, 2024 @07:05AM (#41355994)
Makes you think if they’re perhaps too powerful
Re:Show HN: Z80 Sans by layer8 on Monday August 26, 2024 @07:57AM (#41356284)
It's a simple application of ligature mapping. It looks more powerful than it really is.
Re:Show HN: Z80 Sans by rbanffy on Monday August 26, 2024 @07:19AM (#41356073)
It definitely feels like putting functionality in the wrong places.
Re:Show HN: Z80 Sans by Brian_K_White on Monday August 26, 2024 @10:26AM (#41357454)
Only if you can show that no normal language needs it.
Re:Show HN: Z80 Sans by rbanffy on Monday August 26, 2024 @12:09PM (#41358639)
Certainly there isn’t any natural human language that needs disassembling Z80 binary code.

Yet.

Re:Show HN: Z80 Sans by Brian_K_White on Monday August 26, 2024 @01:19PM (#41359403)
You said "putting functionality in the wrong places".

The font system does not have any such functionality as z80 disassembly. It has generic functionality for generating glyphs.

If there are any normal human written languages that benefit from the functionality to generate modified glyphs dynamically based on content and context rules, then the functionality is not misplaced.

Re:Show HN: Z80 Sans by rbanffy on Monday August 26, 2024 @01:53PM (#41359794)
Of course it’s useful for human languages. Using it to disassemble Z80 hex dumps is what I have mostly aesthetic objections against. It’s both fascinating that it can be done and horrifying that someone actually did it.
Re:Show HN: Z80 Sans by yoavm on Monday August 26, 2024 @07:44AM (#41356208)
cool work! but please use a video instead of a gif in the readme... it's so frustrating not being able to pause, go back, etc.
Re:Show HN: Z80 Sans by Confirm2754 on Monday August 26, 2024 @11:53AM (#41358433)
So evil, so evil! You discovered the programmability of fonts themselves!