4 pointsby sgmonda9 hours ago1 comment
  • sgmonda9 hours ago
    Hi HN! I built Sergamon because I love classic pixel-art fonts and was mass-frustrated with many missing characters and symbols in existing fonts. I wanted a font that treats source code as sacred text, without ligatures, without many weights — what you type is what you see, always.

    I want to share the result, but also the funny build pipeline I've designed. How it works: Every glyph is a plain-text file with an 8×16 grid of dots and X's — basically ASCII art that compiles into a real font. Example:

      # A (U+0041)
    
      ..XXXX..
      .XX..XX.
      XX....XX
      XX....XX
      XXXXXXXX
      XX....XX
      XX....XX
      ........
    
    A TypeScript pipeline parses these files, runs a greedy rectangle-merging optimizer (to keep vector paths compact), and outputs TTF/WOFF2 via opentype.js.

    Design decisions that might be controversial:

    - No ligatures, period. This is a philosophical choice. Your code should render exactly as typed. If you want → , type →. - Single weight. No bold, no light. Like a VT220 terminal — every pixel has the same stroke. - No anti-aliasing intended. The font is designed for integer scaling with no smoothing. It looks best at 16px multiples.

    Some fun challenges along the way:

    - Designing confusable pairs (0/O/o, 1/l/I, backtick/quote) to be instantly distinguishable at small sizes within just 8×16 pixels is a surprisingly hard constraint-satisfaction problem. - Drawing Arabic (254 glyphs with contextual forms) and Devanagari (119 glyphs with combining marks) on a pixel grid meant for Latin was humbling. I have new respect for Unicode.

    3,700+ glyphs so far, covering Latin, Cyrillic, Greek, Hebrew, Arabic, Thai, Devanagari, Georgian, Armenian, braille, box-drawing, math, and more. OFL-licensed.

    Would love feedback and contributions, especially on glyph readability and any scripts/characters I should prioritize next.