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

Add blank space glyph to avoid showing [0020] box after glyphs when space is intended #5

Closed
wants to merge 2 commits into from

Conversation

fletcherw
Copy link

When an icon is followed by a space, instead of rendering a space in the default i3bar font, the space is instead rendered as [0020], since there is no space icon in this font. A workaround for this is to add a space glyph which can be used when a space is intended. I added this glyph as \uE277, and as far as I can tell it works as intended.

This is a solution (sort of) to issue #3

@stark
Copy link
Owner

stark commented Sep 13, 2015

First off, Thank You for the Fix and making a Pull request.

The thing is, I have further added more glyphs to siji which are not pushed yet because some are incomplete. So, If I merge your changes then i'll have to redraw all the new glyphs again.

If you don't mind, Can you Please make this fix against the next push of siji and then create a Pull request ?

Thank You.

@fletcherw
Copy link
Author

Sure! Feel free to ping me when you make the push.

@EnKrypt
Copy link

EnKrypt commented Oct 9, 2016

Unfortunately, this PR does not make a difference on i3blocks

I cloned @fletcherw's repo and installed, using the \uE277 to create a space after the label so that the [0020] box does not appear.

But in effect all that did was display the siji icon, a space after that and then the [0020] box.

I'm at a loss on how to fix this. If I could get a hang of where i3blocks itself was adding its space, maybe I could do something to fix it, but I don't know where that is.

@fletcherw
Copy link
Author

@EnKrypt In order for it to work, make sure that you have no space in between the icon and the rest of the label. It should look something like [siji icon][\uE277 glyph][rest of label]. This will not work if the rest of the label starts with a space, as you still have the same problem. Unfortunately I still don't have a great grasp on how i3bar picks its fonts for rendering, so if that doesn't fix it I can't really help.

@EnKrypt
Copy link

EnKrypt commented Oct 11, 2016

@fletcherw The problem is that i3blocks itself adds a space between the label and the rest of the text which I cannot override. And obviously it's that space that messed everything up.

I fixed this by disabling labels altogether, and editing the i3blocks scripts myself and adding the glyph manually before the appropriate echo or printf statements padded by the \uE277

But yes, I definitely wish there was a better way to fix this problem.

@stark stark closed this Jun 5, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants