Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIDE_GLYPH_SPACING_PATCH doesn't work properly #26

Closed
enesdogan00 opened this issue May 14, 2021 · 17 comments
Closed

WIDE_GLYPH_SPACING_PATCH doesn't work properly #26

enesdogan00 opened this issue May 14, 2021 · 17 comments

Comments

@enesdogan00
Copy link

When I set WIDE_GLYPH_SPACING_PATCH to 1 all characters intersect as it's shown on the screenshot below.

2021-05-14_15-13

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

It probably doesn't work that well when fallback fonts are used. What font do you use with st?

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

The only other alternative is to try and manually hack the Xft library ref. googlefonts/Inconsolata#42 (comment)

@enesdogan00
Copy link
Author

sed. What font do you use with

static char *font = "Mono:pixelsize=20:antialias=true:autohint=true";

that'a the config line for fonts

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

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#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/

@enesdogan00
Copy link
Author

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#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've eneabled that but icons still aren't renderd normally

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

Have you disabled WIDE_GLYPH_SPACING_PATCH?

@enesdogan00
Copy link
Author

Have you disabled WIDE_GLYPH_SPACING_PATCH?

Yes I've

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

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.

@enesdogan00
Copy link
Author

I've tried many fonts (some monospaced some not) still doesn't work.

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

What exactly doesn't work? Have you tried a bare st from https://st.suckless.org/?

@enesdogan00
Copy link
Author

Yes I tried that ass well but icons look like this.

2021-05-14_13-58

They are cropped

@bakkeby
Copy link
Owner

bakkeby commented May 14, 2021

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.

@enesdogan00
Copy link
Author

enesdogan00 commented May 14, 2021

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.

@bakkeby
Copy link
Owner

bakkeby commented May 15, 2021

OK, so I did a git clone of st-flexipatch, compiled and, ran st, started nnn and I get
image

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.

LukeSmithxyz/st@ca42c0c

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 LukeSmithxyz/st#224 (comment) 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.

bakkeby added a commit that referenced this issue May 15, 2021
@enesdogan00
Copy link
Author

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.

@bakkeby
Copy link
Owner

bakkeby commented May 15, 2021

It displays like this for me now:
image

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).

@enesdogan00
Copy link
Author

It displays like this for me now:
image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants