arrowtype / recursive

Recursive Mono & Sans is a variable font family for code & UI
https://recursive.design
SIL Open Font License 1.1
3.27k stars 52 forks source link

Add box drawing characters to monospace #415

Open otherjoel opened 4 years ago

otherjoel commented 4 years ago

Rec Mono doesn’t work for the box-drawing diagrams I sometimes add in the comments of my source code (example).

A resource that might help with this: https://github.com/adobe-type-tools/box-drawing

arrowtype commented 4 years ago

Thanks, @otherjoel! I'll probably add this to the Recursive Code project (https://github.com/arrowtype/recursive-code-config). It's fine to leave the issue here, though.

spookylukey commented 2 weeks ago

The problem seems to be not the drawing characters themselves, which are the right width, but something to do with the space characters - some of the box characters seem to trigger space characters becoming half width, and then nothing lines up as it should.

The bug seems to be dependent on editor/application and/or operating system:

For reference, I'm using the example linked above by @otherjoel, plus the following (from ascii-art-to-unicode package):


  ┌───────────────┐
  │               │
  │       ┌───────┼──┐
  │       │       │  │
  │       │       │  │
  │       │       │  │
  └───────┼───────┘  │
          │          │
          │          │
          │          │
          └──────────┘

  ┏━━━━━━━━━━━━━━━┓
  ┃               ┃
  ┃       ┏━━━━━━━╋━━┓
  ┃       ┃       ┃  ┃
  ┃       ┃       ┃  ┃
  ┃       ┃       ┃  ┃
  ┗━━━━━━━╋━━━━━━━┛  ┃
          ┃          ┃
          ┃          ┃
          ┃          ┃
          ┗━━━━━━━━━━┛

An example buggy rendering from xed:

ksnip_20241014-092629

Workaround

However, for those looking for a work-around, I've found the "Nerd Font" version of Recursive, which comes with quite a few variants, doesn't have this issue in any of the editors I've found - see Nerd Font downloads.