Problem of Using Proportional Font in Code

By Xah Lee. Date: . Last updated: .

Problem of Using Non-Monospace Font in Code

Tried to use Non-Monospace in code, for few months in different years. But i always ends up not adopting.

problem is hard to describe, various minor details.

Problem. Regular Expression Legibility

when you have complex regex string, with variable-width font, it cannot distinguish neighbor APOSTROPHE and QUOTATION MARK.

in general, regex became harder to read if it contains space or l1|O0

emacs variable-pitch-mode regex 2024-12-02 081255
emacs variable-pitch-mode regex 2024-12-02 081255

Problem. Text Not Aligned

one of them, is that in emacs, it screws up the alignment of left margin when you have line numbering on.

when you are at beginning of line, and move cursor up, it may move to the second character in a line.

emacs variable-pitch-mode 2024-12-01 094047
emacs variable-pitch-mode 2024-12-01 094047

Monospaced Font for Coders