If Xft.dpi is not set, some application behave in a strange way (in my example, OpenOffice display font that are too big compared to Thunar). The solution is to set Xft.dpi using X default value. Here us my little script to do that: #!/bin/sh xrdb -query Xft.dpi | grep Xft.dpi > /dev/null && exit 0 RESOLUTION=`xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/"` TMP=`mktemp` trap "rm -f $TMP" EXIT echo "Xft.dpi: $RESOLUTION" > $TMP xrdb -merge $TMP
Created attachment 1578 Solution to always set Xft.dpi
Shouldn't openoffice just be fixed? If we force the default to be used, this should be done in the UI plugin in C code, not in a shell script. And no, that doesn't mean shelling out to xdpyinfo. gdk_screen_get_width/height() and gdk_screen_get_width/height_mm() should be used... but what about xinerama/xrandr-1.2 setups? Meh. Well, current UI plugin doesn't handle different DPIs on different screens anyway...
(In reply to comment #0) > If Xft.dpi is not set, some application behave in a strange way (in my example, > OpenOffice display font that are too big compared to Thunar). I can't reproduce this here. Fonts are ok in OpenOffice (at “system default” of 125dpi). Could you provide a screenshot? > > The solution is to set Xft.dpi using X default value. I'm against this, this is too error-prone. Cheers,
Take a look at my blog: http://le-gall.net/sylvain+violaine/blog/index.php?2008/04/05/41-openofficeorg-fonts-too-big-in-xfce There is a screenshot.
FYI, i don't want the shell script to be used in xfce. This should be a really bad solution. I do prefer to find a clean way to do it in Xfce (through GTK/C/anything which is well integrated with xfce). The shell script is just here to show that there some possible solution -- and give real programmer a hint on how to fix this correctly.
(In reply to comment #4) > Take a look at my blog: > > http://le-gall.net/sylvain+violaine/blog/index.php?2008/04/05/41-openofficeorg-fonts-too-big-in-xfce Yes I saw it and commented there, posting a screenshot from my install. I don't know if this is fixed by openoffice 2.4.0 or if it's because I have the gtk thing installed (wich you seems not to have), but I don't have any problem, without any forced dpi setting.
As I posted on your blog already .. the easiest way of settings the DPI value is to add it to your ~/.Xdefaults: Xft.dpi:<yourvalue> # in my case 75 Apart from that, OpenOffice showing "huge" fonts is most likely not related to anything but an OpenOffice bug. PS: You do know you can set your DPI values through the UI preferences, right?
Corsac: oo-gtk fix the whole thing and seems to be a good solution Moritz: the problem is that i used a laptop and a desktop computer with the same settings -> they don't have the same DPI value, i would have prefer to have a good default set than to force it.
Having a little discussion with Corsac, lead me to think it is better not to set the Xft.dpi. This is done in Gnome/KDE but it is mainly for legacy (at a time this was better to always set it). Using oo-gtk is a better solution for this problem. Big thank to the XFCE team The bug should be closed or set as a duplicate of 3164.
Marking wontfix, then.