Settings

Theme

Show HN: Z80 Sans

github.com

65 points by 0d0a 2 years ago · 13 comments

Reader

hyperhello 2 years ago

"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!

1GZ0 2 years ago

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.

  • layer8 2 years ago

    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)

  • rbanffy 2 years ago

    I am equally amazed and horrified. Fonts shouldn't do that. ;-)

  • tambourine_man 2 years ago

    Makes you think if they’re perhaps too powerful

    • layer8 2 years ago

      It's a simple application of ligature mapping. It looks more powerful than it really is.

    • rbanffy 2 years ago

      It definitely feels like putting functionality in the wrong places.

      • Brian_K_White 2 years ago

        Only if you can show that no normal language needs it.

        • rbanffy 2 years ago

          Certainly there isn’t any natural human language that needs disassembling Z80 binary code.

          Yet.

          • Brian_K_White 2 years ago

            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.

            • rbanffy 2 years ago

              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.

Confirm2754 2 years ago

So evil, so evil! You discovered the programmability of fonts themselves!

yoavm 2 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection