martinthomson / aasvg

Turn ASCII art into SVG
BSD 2-Clause "Simplified" License
70 stars 11 forks source link

Box drawing characters #9

Open martinthomson opened 2 years ago

martinthomson commented 2 years ago

There is some limited support for these in the tool, but that support needs a fair bit of work. Do that work.

https://www.fileformat.info/info/unicode/block/box_drawing/list.htm

dkg commented 1 year ago

Just out of curiosity, is this issue about supporting box drawing characters as input or as some sort of rendered output?

I would personally be happy if we could use them as input, as an alternative to the current 7-bit clean |, -.

martinthomson commented 1 year ago

Yeah, the goal is to properly recognise all the various box drawing characters as input. Some are already recognised, but nothing comprehensive.

dkg commented 1 month ago

Here is a test vector, that would be useful if it could be transformed safely by aasvg:

╭────────────╮                           ╭────────────╮
│            │ P:Y                       │            │
│            ╞══════════════════════════▶│            │
│   Cert X   │                           │   Cert Y   │
│            │                       F:X │            │
│            │◁──────────────────────────┤            │
╰────────┬───╯                           ╰────────╥───╯
   ▲     │ F:Z                              △     ║ P:Z
   ║     │          ╭────────────╮          │     ║
   ║     │          │            │ F:Y      │     ║
   ║     └─────────▷│            ├──────────┘     ║
   ║                │   Cert Z   │                ║
   ║            P:X │            │                ║
   ╚════════════════╡            │◀═══════════════╝
                    ╰────────────╯