Tabs (\t) don't display correctly #137

Open
opened 2 months ago by freijon · 3 comments

One of my commands displays a list like this:
<id>\t<name>
(a numberical ID, followed by a tab, followed by a name).

When executing this command in a terminal (foot) or when using bemenu, the "number of spaces" is variable, depending of the length of the ID. The name starts always at the same horizontal position.

With fuzzel this doesn't work. With the font I want to use in fuzzel, there is a square symbol, indicating a missing symbol. However, I know that the font supports this, because when I use bemenu with the same font I don't have this issue.

Screenshot of fuzzel visualizing the issue
as can be seen here, fuzzel doesn't display the tab spaces correctly.

Screenshot of bemenu showing how fuzzel should behave
...not so in bemenu where the tab is displayed correctly with a variable width and no square icon.

One of my commands displays a list like this: `<id>\t<name>` (a numberical ID, followed by a tab, followed by a name). When executing this command in a terminal (foot) or when using `bemenu`, the "number of spaces" is variable, depending of the length of the ID. The name starts always at the same horizontal position. With `fuzzel` this doesn't work. With the font I want to use in fuzzel, there is a square symbol, indicating a missing symbol. However, I know that the font supports this, because when I use `bemenu` with the same font I don't have this issue. ![Screenshot of fuzzel visualizing the issue](https://i.imgur.com/J0gSn8f.png) as can be seen here, `fuzzel` doesn't display the tab spaces correctly. ![Screenshot of bemenu showing how fuzzel should behave](https://i.imgur.com/iVIloAG.png) ...not so in `bemenu` where the tab is displayed correctly with a variable width and no square icon.
Owner

That's not quite how font glyphs work... regardless of character, a glyph always has a fixed width.

bemenu is probably translating the tab character to either a number of spaces, or by offsetting the next character by some other mean.

Are you using a monospace font in bemenu? Is it still aligned if you use a non-monospace font?

That's not quite how font glyphs work... regardless of character, a glyph **always** has a fixed width. bemenu is probably translating the tab character to either a number of spaces, or by offsetting the next character by some other mean. Are you using a monospace font in bemenu? Is it still aligned if you use a non-monospace font?
Poster

I use the same font in bemenu as in fuzzel, which is a monospace font.

I tried bemenu with a non-monospace font: Indeed, the names are still aligned nicely. Same on foot.

I use the same font in `bemenu` as in `fuzzel`, which is a monospace font. I tried `bemenu` with a non-monospace font: Indeed, the names are still aligned nicely. Same on `foot`.
Owner

Same on foot.

Tabs in a terminal is a whole different thing..

Anyways, we can fix this in either fuzzel, or in fcft (the font rendering library used by fuzzel). In a way, it makes more sense to do this in fuzzel, but on the other hand will be much more difficult.

Let me think about this.

> Same on foot. Tabs in a terminal is a _whole_ different thing.. Anyways, we can fix this in either fuzzel, or in fcft (the font rendering library used by fuzzel). In a way, it makes more sense to do this in fuzzel, but on the other hand will be much more difficult. Let me think about this.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: dnkl/fuzzel#137
Loading…
There is no content yet.