Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432224 - app-admin/keepass - windows and dialogs have scrambled fonts with dev-dotnet/libgdiplus-4.2
Summary: app-admin/keepass - windows and dialogs have scrambled fonts with dev-dotnet/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alessandro Di Federico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 17:15 UTC by Marek Sapota
Modified: 2016-01-28 18:37 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info dev-lang/mono (info.txt,6.63 KB, text/plain)
2012-08-22 13:16 UTC, Marek Sapota
Details
libgdiplus-4.2-r1.patch (libgdiplus-4.2-r1.patch,283 bytes, patch)
2016-01-27 22:14 UTC, Alessandro Di Federico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Sapota 2012-08-21 17:15:43 UTC
As mentioned already in the original ebuild request (https://bugs.gentoo.org/show_bug.cgi?id=371723#c5) KeePass is unusable because of empty/reduced/otherwise deformed strings in the UI.  I’m getting similar results as the original poster:
https://bugs.gentoo.org/attachment.cgi?id=304289
https://bugs.gentoo.org/attachment.cgi?id=304291
https://bugs.gentoo.org/attachment.cgi?id=304295

Reproducible: Always
Comment 1 Michael Palimaka (kensington) gentoo-dev 2012-08-22 12:59:58 UTC
Please paste the output of emerge --info dev-lang/mono.
Comment 2 Marek Sapota 2012-08-22 13:16:07 UTC
Created attachment 321946 [details]
emerge --info dev-lang/mono
Comment 3 Michael Palimaka (kensington) gentoo-dev 2012-08-23 16:39:45 UTC
Do you have dev-dotnet/libgdiplus merged? If so, which version and with which USE flags?
Comment 4 Marek Sapota 2012-08-23 18:03:39 UTC
2.10.9 with “cairo” flag.
Comment 5 Alessandro Di Federico 2012-09-02 22:37:20 UTC
I had the same problem, but I don't remember how I fixed it, sadly.

Are you using an Intel driver for X.org? Which version? Can you try to update it?

Can you try to enable ForceSystemFontUnix in the configuration file as described here?
http://sourceforge.net/projects/keepass/forums/forum/329221/topic/3915299
Comment 6 Marek Sapota 2012-09-05 14:10:31 UTC
(In reply to comment #5)
> Are you using an Intel driver for X.org? Which version? Can you try to
> update it?

I’m using “=x11-drivers/xf86-video-intel-2.20.6” which I believe is the newest available version.

> Can you try to enable ForceSystemFontUnix in the configuration file as
> described here?
> http://sourceforge.net/projects/keepass/forums/forum/329221/topic/3915299

This didn’t help.  In fact after starting KeePass the config file got changed and the added line was removed.
Comment 7 Michael Palimaka (kensington) gentoo-dev 2012-09-05 16:40:17 UTC
(In reply to comment #5)
> Are you using an Intel driver for X.org?
Interesting, there seems to be have been a lot of activity regarding the intel driver and cairo/mono:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/462349
https://bugs.launchpad.net/gtg/+bug/458545
Comment 8 Michael Palimaka (kensington) gentoo-dev 2012-09-11 14:26:04 UTC
@Alessandro: were you also using the intel driver when you were experiencing the problem?
Comment 9 Alessandro Di Federico 2012-09-11 14:48:20 UTC
Yes, but I don't really remember how I fixed that. However it was something easy, like updating the driver or recompiling dev-dotnet/libgdiplus with the cairo option.
Comment 10 Marek Sapota 2012-09-15 18:57:19 UTC
(In reply to comment #9)
I’ve tried recompiling dev-dotnet/libgdiplus with and without the cairo option and updating intel driver to the latest version but it didn’t fix the problem.
Comment 11 Alessandro Di Federico 2012-09-16 11:18:25 UTC
Does it happen if you download the ZIP archive from the official website, unpacke it and `mono KeePass.exe`? It shouldn't make any difference, but it's worth trying.
Comment 12 Marek Sapota 2012-09-17 22:31:25 UTC
It looks exactly the same as the version installed through portage.
Comment 13 Michael Palimaka (kensington) gentoo-dev 2012-12-01 13:52:33 UTC
This seems to be some sort of mono/cairo/intel combination bug, so CCing those teams in case they have some ideas.

> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/462349
> https://bugs.launchpad.net/gtg/+bug/458545
Comment 14 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-01 15:58:31 UTC
Which version of cairo? If >=1.12, it may be due to https://bugs.freedesktop.org/show_bug.cgi?id=47266
Comment 15 Michael Palimaka (kensington) gentoo-dev 2013-01-15 16:09:02 UTC
(In reply to comment #14)
> Which version of cairo? If >=1.12, it may be due to
> https://bugs.freedesktop.org/show_bug.cgi?id=47266

Which version of cairo do you have?
There have been quite a number of new intel driver releases, does a more recent version work for you?
Comment 16 Martin von Gagern 2016-01-27 09:17:50 UTC
I'm seeing something very similar to  attachment 304295 [details], too. And if I press ESC, I get similar narrow printing for the menus. Here is my setup:

app-admin/keepass-2.31[-aot]
dev-lang/mono-4.2.2.10-r1[nls -doc -minimal -pax_kernel -xen]
dev-dotnet/libgdiplus-4.2[cairo]
x11-libs/cairo-1.14.6[X glib opengl svg xcb -aqua -debug -directfb -gles2 -static-libs -valgrind -xlib-xcb]
x11-drivers/nvidia-drivers-358.16-r1[X acpi gtk2 gtk3 kms multilib tools uvm -pax_kernel]

I do know that on Aug 27 2015, keepass-2.30 used to work for me with the modification described in bug 558094 comment 14. That would have been using mono-4.0.3.20 and libgdiplus-3.12.
Comment 17 Alessandro Di Federico 2016-01-27 11:56:25 UTC
(In reply to Martin von Gagern from comment #16)
> I do know that on Aug 27 2015, keepass-2.30 used to work for me with the
> modification described in bug 558094 comment 14. That would have been using
> mono-4.0.3.20 and libgdiplus-3.12.

I can now reproduce the problem, the culprit seems to be libgdiplus-4.2. Current workaround: downgrade to libgdiplus-3.12.

Will try to better investigate the problem.
Comment 18 Alessandro Di Federico 2016-01-27 12:06:40 UTC
This is pretty weird, the only changes from 3.12 to 4.2 are related to giflib:

https://github.com/mono/libgdiplus/compare/f18514c8babf20301f8bbd1f0cfd587ed48a480b...master

Mmmmh.
Comment 19 Alessandro Di Federico 2016-01-27 22:08:23 UTC
I think I got it. That behavior is triggered when you use pango! The point is that the libgdiplus ebuild from 3.12 to 4.2 introduced the following change:

                --disable-static \
-               $(usex cairo "" "--with-pango")
+               $(use_with cairo pango)
 }

However, this flips the meaning of the cairo USE flag, which is supposed to enable cairo (if enabled) or pango (otherwise). But $(use_with cairo pango) does exactly the opposite!

Long story short, don't use pango, so try disabling the cairo USE flag or applying the attached patch to the ebuild.

I've tested it and it works fine.
Comment 20 Alessandro Di Federico 2016-01-27 22:14:23 UTC
Created attachment 424026 [details, diff]
libgdiplus-4.2-r1.patch

`--with-cairo` is an undocumented option in ./configure apparently. So this will raise a QA warning. On the other hand, `$(use_with !cairo pango)` won't work, since `--without-pango` is ignored by `./configure`. The other option would be to remove to go back to `$(usex cairo "" "--with-pango")` which worked fine.
Comment 21 Michael Palimaka (kensington) gentoo-dev 2016-01-28 18:37:52 UTC
Someone pushed the fix already apparently:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=311ffe1a3321b5b0f597f2ad124a9874ef16707b