Closed enesdogan00 closed 3 years ago
It probably doesn't work that well when fallback fonts are used. What font do you use with st?
The only other alternative is to try and manually hack the Xft library ref. https://github.com/googlefonts/Inconsolata/issues/42#issuecomment-791452847
sed. What font do you use with
static char *font = "Mono:pixelsize=20:antialias=true:autohint=true";
that'a the config line for fonts
I guess the behaviour you are seeing is expected then.
The WIDE_GLYPH_SPACING_PATCH
is a specific workaround for Inconsolata v3.000, one of Google's Variable Fonts (VF), where the letter spacing is too wide when rendered via the Xft library, see:
https://github.com/googlefonts/Inconsolata/issues/42
The workaround artificially makes the spacing a third of what Xft says it is.
Perhaps you were looking for the WIDE_GLYPHS_PATCH
that adds support for wide icons ref.
https://www.reddit.com/r/suckless/comments/jt90ai/update_support_for_proper_glyph_rendering_in_st/
I guess the behaviour you are seeing is expected then.
The
WIDE_GLYPH_SPACING_PATCH
is a specific workaround for Inconsolata v3.000, one of Google's Variable Fonts (VF), where the letter spacing is too wide when rendered via the Xft library, see: googlefonts/Inconsolata#42The workaround artificially makes the spacing a third of what Xft says it is.
Perhaps you were looking for the
WIDE_GLYPHS_PATCH
that adds support for wide icons ref. https://www.reddit.com/r/suckless/comments/jt90ai/update_support_for_proper_glyph_rendering_in_st/
I've eneabled that but icons still aren't renderd normally
Have you disabled WIDE_GLYPH_SPACING_PATCH
?
Have you disabled
WIDE_GLYPH_SPACING_PATCH
?
Yes I've
Are you sure that you have a font that is named just "Mono"?
You can check what fonts you have using fc-list
.
Otherwise it will fall back to using something from system configuration, possibly /etc/fonts/fonts.conf
.
I've tried many fonts (some monospaced some not) still doesn't work.
What exactly doesn't work? Have you tried a bare st from https://st.suckless.org/?
Yes I tried that ass well but icons look like this.
They are cropped
The screenshot is the same as in the reddit post. What is this terminal application? The original patch assumed that the boxdraw patch is included, but quite strictly it shouldn't be necessary. You can of course try and enable BOXDRAW_PATCH
to see if it makes any difference.
I enabled the patch but still no change. Terminal app is nnn with icon flag enabled. If you're on an Arch based system package name is nnn-icons on AUR.
OK, so I did a git clone of st-flexipatch, compiled and, ran st, started nnn
and I get
Showing cut-off icons as in your example. Enabling WIDE_GLYPHS_PATCH
did not make any difference.
The patch worked fine for lsd for example when I originally tested this, but it clearly does not work for nnn
in this case.
After some digging I found that the patch also relies on these changes, although it is not clear why exactly.
https://github.com/LukeSmithxyz/st/pull/224/commits/ca42c0cc02f0a11e8171f1dfda1a916139e3de01
I have integrated the above into the wide glyphs patch, can you give it another go and see if it works correctly for you now?
According to https://github.com/LukeSmithxyz/st/pull/224#issuecomment-674060073 there is also an issue where the wide glyphs patch can leave remnant data in the undrawable area when the anysize patch is used, possibly this could be solved by using a smaller font size for the fallback emoji font.
Thans for your efforts but it didn't work. I cloned the repo from scratch and enabled WIDE_GLYPHS_PATCH
. I'm going to find something and create a pull request for that.
It displays like this for me now:
You may try and see if Luke Smith's build shows correctly for you (for me no icons showed up, but I suspect that would be due to a fonts issue).
It displays like this for me now:
You may try and see if Luke Smith's build shows correctly for you (for me no icons showed up, but I suspect that would be due to a fonts issue).
Alright thanks for the help
When I set WIDE_GLYPH_SPACING_PATCH to 1 all characters intersect as it's shown on the screenshot below.