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

Window titles shifted downward when truncated following pango update to 1.44.1 #3755

Open
jolmg opened this issue Aug 2, 2019 · 9 comments

Comments

@jolmg
Copy link

commented Aug 2, 2019

NOTE

I'm making this issue as an i3 equivalent to:

https://gitlab.gnome.org/GNOME/pango/issues/397

If the problem is ultimately with pango, they need to know how exactly i3 uses pango to raise this problem. I'm making this issue in hopes that the 2 communities can collaborate in figuring this out.

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

Window title text is shifted downwards when it's truncated due to insufficient space in titlebar:

pango-vertical-bug-comparison

Expected Behavior

The expected behavior is what can be seen when using pango 1.43.0 as depicted above.

Reproduction Instructions

  1. upgrade pango to 1.44.1
  2. cause a window title to truncate by making a large enough title or shrinking the window horizontally or making enough tabs

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.16.1 (2019-01-27) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16.1 (2019-01-27) (pid 1100)abort…)
Loaded i3 config: /home/jol/.config/i3/config (Last modified: 2019-08-02T09:19:54 PDT, 7998 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

The problem can be seen with the default config:

https://raw.githubusercontent.com/i3/i3/master/etc/config

Though, personally I'm testing with these relevant details:

font pango:Sans 7

or

font pango:Fixed 7

after following the guide I made here:

https://gitlab.gnome.org/GNOME/pango/issues/386#note_570411

- Linux Distribution & Version: Archlinux last updated 2 or 3 days ago (no versions)
- Are you using a compositor (e.g., xcompmgr or compton): No
@jolmg

This comment was marked as resolved.

Copy link
Author

commented Aug 2, 2019

The comments in the issue template said that the logfile was optional. If someone really wants it, please ask and I'll provide.

@Airblader

This comment has been minimized.

Copy link
Member

commented Aug 2, 2019

Thanks for reporting this, but we're already tracking it in #3752 :-)

@Airblader Airblader closed this Aug 2, 2019

@Airblader

This comment has been minimized.

Copy link
Member

commented Aug 2, 2019

Actually this might be a different one? Reopening for the moment.

@Airblader Airblader reopened this Aug 2, 2019

@Airblader

This comment has been minimized.

Copy link
Member

commented Aug 2, 2019

Our code for rendering text using pango can be found here: https://github.com/i3/i3/blob/next/libi3/font.c#L86

@jolmg

This comment has been minimized.

Copy link
Author

commented Aug 2, 2019

I was thinking of making another issue for the uneven horizontal spacing shown with the slashes that can be seen in the bottom right window example in the image I provided, to reflect this other pango issue:

https://gitlab.gnome.org/GNOME/pango/issues/398

Because Matthias Clasen, a pango developer, expected that to be fixed with cairo from master and it wasn't, he's also wanting to know how i3 causes that to turn up. I also couldn't replicate the same issue using:

$ pango-view --font="Sans 7" <(echo ////////////////////////////////////)

but it does happen in the i3 titlebars when using Sans 7.

So, anyway, would you like a new issue for that, since it might also be different?

@jolmg

This comment has been minimized.

Copy link
Author

commented Aug 3, 2019

Matthias Clasen took a look at the i3 code and commented the following[1]:

I took a look at the i3 drawing code. It uses the xcb code in cairo, which has not been updated to support subpixel positions. Only image and xlib surfaces support this, currently.

Too bad that cairo doesn't really have maintainers anymore. I can't be responsible for fixing up all the cairo compositors

If you make i3 render the text on an image surface, cairo master will fix this issue.

[1] https://gitlab.gnome.org/GNOME/pango/issues/398#note_571512

@jolmg

This comment has been minimized.

Copy link
Author

commented Aug 3, 2019

Re-reading that, he's probably referring to the other issue regarding the slashes. I'm going to make that other issue here after all, since it apparently implies a separate fix.

@mighty9245

This comment has been minimized.

Copy link

commented Aug 6, 2019

i bet it happens because of long title got cropped and ellipsis added, so it's a bug in pango. the same issue with tint2 is being tracked here: https://gitlab.com/o9000/tint2/issues/760

@mighty9245

This comment has been minimized.

Copy link

commented Aug 24, 2019

i've just tested my tint2 configuration and issue with text being moved down by ellipsis is gone now, looks like either pango or cairo updated recently with a fix, because there were no recent updates of tint2

you can make sure that you are using latest versions of pango and cairo and test your i3 configuration to see was this issue fixed, because as i can see there is no need to perform additional actions for developers using these libraries

i'm on pango 1:1.44.5-1 and cairo 1.17.2+17+g52a7c79fd-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.