tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
76.87k stars 3.09k forks source link

combining box-drawing and arrows #1490

Open Cube707 opened 1 year ago

Cube707 commented 1 year ago

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?

tonsky commented 1 year ago

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

Cube707 commented 1 year ago

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.

cdhagmann commented 1 year ago

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 commented 1 year ago

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

tonsky commented 1 year ago

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

cdhagmann commented 1 year ago

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