FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

combining box-drawing and arrows

Open Cube707 opened this issue 3 years ago • 6 comments

I am currently trying to combine box-drawing and arrow glyphs to create my own terminal-promp. Here is an example: (U+2514 U+2500 U+2192, font-size 36)

image

As can bee seen, there is a slight gap beween the glyphs. I also tested multiple alternatives, no one matched completely:

image

In generall I can live with one of the above, especially the first one in lines one and two are acceptable, but I still want to ask:

Would it be sensible to change on of the existing glyphs to fully integrate with the border elements?
Or could a new glyph be intreduced (feels unnecicary to me)
Or is there an existing way to get this to work?

Cube707 avatar Dec 06 '22 13:12 Cube707

Yeah, the problem is that rightward arrow and box-drawing were never meant to be used together.

I don’t think it makes sense to adjust arrow, as it’s fine-tuned to work with dashes and lowercase chars.

Adjusting box-drawing is possible, probably? I’m not sure what the consequence will be. IIRC, box drawing don’t have weights, but arrows do

Or we can introduce ligature for this specific use-case :) I think the latter is the best and safest way forward

tonsky avatar Dec 06 '22 22:12 tonsky

A ligature for this would be awsome, if its not to complicated to implement.

From my limited point of view, it could also be beneficial to have the box-glyphs match the dashes+arrows as it would allow for more creativity when using boxes (like dashing out pats of a box outline etc.) But I am also not sure if this would have side effects.

Cube707 avatar Dec 07 '22 07:12 Cube707

I am also running into this issue. I recently found two options that both looked promising ─⏵ and ─➤ but both arrowheads are larger than the monospace.

cdhagmann avatar Apr 28 '23 12:04 cdhagmann

I am trying to do something much less intense than the below, but add this for how far some have taken it.

My specific use case is in trying to diagram a simple flow

Screenshot 2023-05-01 at 12 40 39 PM

diagram

cdhagmann avatar May 01 '23 16:05 cdhagmann

What character does Pragmata Mono uses in this diagram for arrow?

tonsky avatar May 01 '23 21:05 tonsky

I am not knowledgeable about fonts, but this is the github issue related to the feature: https://github.com/fabrizioschiavi/pragmatapro/issues/159

cdhagmann avatar May 04 '23 17:05 cdhagmann