UI fonts of OpenOffice.org Writer and XFCE thunar are really not the same

... years of seeing this ugly font and being force to scale the OpenOffice.org UI display to 80%.

I just found the solution!

All his related to a X settings: Xft.dpi. People are suggesting around to set it to 96 or something like that. I just decide to use the one i can find xdpyinfo (does it make sense?) and send the result to X settings using xrbd.

Here is the script $HOME/bin/xfce4-xft.sh:

#!/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

Copy/paste/chmod a+x this file.

And then add a file $HOME/.config/autostart/xfce4-xft.desktop to autostart the previous script:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=XFCE-XFT
Comment=Fix XFCE Xft.dpi settings
Exec=/home/gildor/bin/xfce4-xft.sh
StartupNotify=false
Terminal=false
Hidden=false

(replace /home/gildor/ by your own home directory)

Thats it. Your Xft.dpi will be fixed depending on the configuration of your X server. This allow you to have a laptop and a desktop with different screen resolution.

I am waiting the email from bugzilla.xfce.org to submit this script to XFCE bug tracking.

Enjoy.

Update:

Following the comment of this entry, another better solution is to use openoffice.org-gtk which works out-of-the-box with a clean UI. I don't even have to force OO to gnome style.

Thanks to Dan Callahan, Vasilis and Corsac for their suggestion.