cormullion / juliamono

repository for JuliaMono, a monospaced font with reasonable Unicode support.
https://juliamono.netlify.app/
SIL Open Font License 1.1
1.42k stars 29 forks source link

Gaps in boxes drawn with double frames #157

Open VladimirMarkelov opened 1 year ago

VladimirMarkelov commented 1 year ago

Thank you for the great font! I love it. The only small issue is that a few (not all) double frame characters are drawn with gaps.

Windows 10 Home, Font version 0.048 (I installed only 4 fonts: regular, bold, italic, and bold+italic):

image

I spotted the issue in Conemu with FAR running inside it. FAR uses double frames in the main window and the gaps at the bottom of the screen are always visible. I took an example from https://en.wikipedia.org/wiki/Box-drawing_character#Examples:

┌─┬┐  ╔═╦╗  ╓─╥╖  ╒═╤╕
│ ││  ║ ║║  ║ ║║  │ ││
├─┼┤  ╠═╬╣  ╟─╫╢  ╞═╪╡
└─┴┘  ╚═╩╝  ╙─╨╜  ╘═╧╛
┌───────────────────┐
│  ╔═══╗ Some Text  │▒
│  ╚═╦═╝ in the box │▒
╞═╤══╩══╤═══════════╡▒
│ ├──┬──┤           │▒
│ └──┴──┘           │▒
└───────────────────┘▒
 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

In tried few more applications(including Notepad++ and gVim). The boxes above are displayed with gaps everywhere. On another laptop (different laptop brand and Windows version), the gaps are visible, too. I do not have MacOS at hand, so I cannot check it there. Changing the size of the font did not fix anything (moreover, on small sizes around 5-6, the gaps appears even for single frames, but I doubt 5-6 font size is usable, so it is not a problem at all).

It is a screenshot from Notepad++. As you see, only some bottom box parts have gaps. Top and middle ones are fine:

image

I found an old closed issue https://github.com/cormullion/juliamono/issues/109 . The issue suggested to remove ASCII versions of the font. In my case, I do not have any of them(see the first screenshot). I started using your font since version 0.047 and then updated to 0.048. Both times I installed the same 4 font files.

If the issue is not reproducible at your machine, no problem - I can live with gaps 😄

Thank you!

cormullion commented 1 year ago

Hi, Vladimir, thanks for the report!

I could be wrong, but I'm guessing that you have the line spacing/leading set to 1.2 or more.

As far as I know most fonts won't draw boxes that connect vertically once the line spacing gets above a certain value, 1.2 here. (I've not found one yet.)

IBM Plex Mono:

boxes-plex

Cascadia Code:

boes-cascadea

Fira Code:

boxes-firacode

Some terminal applications (wezterm, kitty, perhaps) provide you with an option for drawing box characters directly, rather than relying on a font's box character drawing set. These will be drawn correctly, because the terminal knows exactly how widely separated the lines are, even if the font doesn't.

Having said that - if these other fonts don't show gaps on your system but JuliaMono does, then I confess I'm puzzled as to the cause, and solution... 🤔

VladimirMarkelov commented 1 year ago

Yes, some fonts display the boxes correctly in Notepad++. Cascadia code looks similar to what your posted. But Fira Code looks good:

image

I tried other fonts, and found fonts that shows correctly: Courier New, Dejavu Sans Mono, Liberation Mono, Victor Mono and a few more. Here is DejaVu Sans Mono:

image

and Victor Mono:

image

Some other fonts failed to show correct boxes: e.g, "Iosevka Fixed", "Input". "Hack"(though, Hack has different trouble).

I have no clue why it happens, too 😄 Thank for trying to help. It is a tiny trouble: do not waste much time on it. Feel free to close the issue.

cormullion commented 1 year ago

Thanks for the research. It’s puzzling. I wonder whether font hinting is contributing to the confusion… When I’m in “font design mode” these little inconsistencies bother me. I’ll leave this open for now, in case any new information comes up.

github-actions[bot] commented 11 months ago

This issue has been open for 30 days with no activity.