[SOLVED] How to make Openbox font rendering equal to XFCE's?

Everything about X, Gnome, KDE, ... and everything running on it

[SOLVED] How to make Openbox font rendering equal to XFCE's?

Postby Fernando Negro » 2018-04-05 00:16

Through the years, whenever I try to adopt Openbox as my "desktop environment", I always reach the same problem... I end up realizing that (contrary to XFCE and other desktop environments) the font rendering is not equal in all the programs that run on Openbox.

This time (with Debian 9 Stretch) after reading a post on the Arch Linux forums (https://bbs.archlinux.org/viewtopic.php?id=158621) about how to write two font configuration files, I thought I had finally solved this... Only to later realize that, this time the differences are very subtle, but are still there...

(Here go two screenshots I've took on the same Debian system, while running the same 3 programs - the first one while using XFCE, and the second one while using Openbox.)

Image

Image

(On XFCE, they all render in the same way. While, on Openbox, they render slightly differently...)

What do I have to do, besides what I have done already?

(I've also used the LXAppearance program, to make sure that the "~/.gtkrc-2.0" and "~/.config/gtk-3.0/settings.ini" files have the same configuration.)

Is it then impossible to have all the fonts rendering in the same way on Openbox? (And, if so, why?)
Last edited by Fernando Negro on 2018-04-05 20:27, edited 1 time in total.
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby debiman » 2018-04-05 05:34

can you please point out what renders differently in the openbox screenshot, and how?
also the fonts in the xfce screenshot are all different colors and opacities, it's really a stretch to say they all look the same.
sorry, maybe my eyes are failing, but i do not see the point you are making.

what exactly did you try to solve this?
is xfce used by the same user as openbox?
did you upgrade to stretch, or reinstall?
how did you install xfce/openbox, how did you set up your openbox environment (just installing it on top of a barebones install is hardly enough)?

you see, this is a HUGE topic.
User avatar
debiman
 
Posts: 2900
Joined: 2013-03-12 07:18

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby Fernando Negro » 2018-04-05 16:46

Hello, debiman.

What I did, to try to make the fonts in Openbox all render in the same way, was to edit the "~/.Xdefaults" and "~/.config/fontconfig/fonts.conf" files - as it's said in an Arch Linux forums post (https://bbs.archlinux.org/viewtopic.php ... 0#p1236040) - and also use the program LXAppearance, that - from what I see in one of the following files - I believe is responsible for editing the GTK 2 and 3 configuration files "~/.gtkrc-2.0" and "~/.config/gtk-3.0/settings.ini".

(Being these the only files that I know of, where one can edit the font settings used by Openbox...)

Concerning the computer I'm using, what I did was to freshly install Debian from a "network install" with a minimal USB pen, choose to install a graphical environment, and specifically XFCE. After that, I installed some Openbox packages - like openbox itself, obconf and obmenu, and also some others recommended by the people who use Openbox (https://www.youtube.com/watch?v=_FZCXVgiORA). And, concerning the user, I'm using the same user account when I use (log in to) both XFCE or Openbox.

(And, if I did anything wrong in the way I've installed Openbox, I can reinstall my Debian system again with no problems - and know how to install Openbox from a minimum installation of Debian with no graphical environment.)

Concerning the way that fonts render in the screenshots I've posted,

In XFCE,

Yes, they appear with different "highlighting" or opacities (as it happens when some windows are active, and others not). But, from what I see, the font in question is rendered in the same way in all windows. That is, all the letters have the same shape, height and size.

In Openbox,

(The best way is to probably download the picture, and magnify it in a viewing program of your choice... And, I will anyway make another upload of a screenshot with more windows, this time with the picture magnified, and also an upload of screenshots of the words in question side by side.)

1) If you notice the "i" in the "File" menu, you'll see that the dot on top of the "i" is above the preceding "F" on windows 1 and 3, but at the same level as the top of the "F" in window 2. (And, the same thing happens in the "Vi" part of the "View" menus.)

2) The "d" in the "Edit" menu is noticeably higher (at least) in window 1.

3) And, from what I can tell, the "H" in the "Help" menu is different (at least) in window 1 (different shape/size).

(While none of this happens in XFCE...)
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby Fernando Negro » 2018-04-05 17:48

Here go more screenshots, then.

(I'm sorry for not having made them sooner - since, I'm supposed to make my explanations as clear as possible...)

The following is another original screenshot.

Image

The following is that same screenshot magnified 3 times (you'll have to right-click on it, "View Image", to see it in full).

Image

And, the following are the "File" menus of the previous windows, disposed in an "anti-clockwise" way (so that you can all better compare the letters).

Image

(Notice that, while the "File" menu of windows 1 and 3 looks the same, in the case of windows 2 and 4 - that have the same "i" dot higher than the "F" - the space the letter "l" has between the preceding "i" and the following "e" is bigger in window 4 - to the point that, if you compare window 4 with window 3 below, you can see that the word ends up having a different size.)
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby Fernando Negro » 2018-04-05 18:12

Please, "Help" me! ;)

Image
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby Head_on_a_Stick » 2018-04-05 18:58

Fernando Negro wrote:~/.Xdefaults

I don't think all programs read that.

Try
Code: Select all
cp ~/.Xdefaults ~/.Xresources
User avatar
Head_on_a_Stick
 
Posts: 7992
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby Fernando Negro » 2018-04-05 19:52

Addendum: As I said, this same thing does *not* happen in XFCE.

Image
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: How can I make Openbox's font rendering equal to XFCE's?

Postby Fernando Negro » 2018-04-05 20:23

Head_on_a_Stick wrote:Try
Code: Select all
cp ~/.Xdefaults ~/.Xresources


Ah! Thank you so much, Head_on_a_Stick!

This is how Openbox looks now, on my system, after having I made that file copy you told me to.

Image

My problem is then solved. :)

Aha. I'm so happy now, to have solved what was to me a years-old problem. :) I thought that this was something impossible to do - and that could only be corrected by "daemons" (like "gnome-settings-daemon") used by real desktop environments - but I see that I was wrong...

I can now finally use Openbox as an even lighter alternative to XFCE, and other real desktop environments - since, I now know how to set it up from scratch, after a minimal Debian install, by editing all the necessary and correct files. :)

(I will then mark this thread as "SOLVED".)

Thank you so much again, Head_on_a_Stick!
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: [SOLVED] How to make Openbox font rendering equal to XFC

Postby Fernando Negro » 2018-04-05 20:29

Thank you also, debiman, for all your patience, help and availability. :)
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: [SOLVED] How to make Openbox font rendering equal to XFC

Postby debiman » 2018-04-07 10:08

Fernando Negro wrote:Thank you also, debiman, for all your patience, help and availability. :)

well i wasn't really, but i accept it.
incidentally i just wrote two articles on font rendering:
http://dt.iki.fi/fontconfig-1
I haven't touched upon the different toolkits (gtk2, gtk3, qt4, qt5,...), so thanks for the additional input.
User avatar
debiman
 
Posts: 2900
Joined: 2013-03-12 07:18

Re: [SOLVED] How to make Openbox font rendering equal to XFC

Postby Fernando Negro » 2018-08-09 21:59

(And, having I finally had the opportunity today to reinstall Debian...)


For all those of you who might want to do the same thing I did, of just installing a simple Window Manager on top of a minimal Debian installation,

I just came here to add that, for some reason, unless you install GIMP also (probably because of some dependency this program has) you still won't have a proper font rendering.


With the difference being the one that can be observed,

1) Between this set of text samples:

Image

Image

Image

2) And this one:

Image

Image

Image

(The fonts affected by this are, at least, the "Helvetica" and "Book Antiqua" ones.)


I have no idea why this happens. But, for anyone who might want to figure it out, the following are the packages that I had to install along with GIMP - after which my fonts finally started all to render properly.

The following NEW packages will be installed:
fonts-droid-fallback fonts-noto-mono ghostscript gimp gimp-data gsfonts libaacs0 libamd2 libavformat57 libbabl-0.1-0 libbdplus0 libbluray1 libcamd2 libccolamd2 libcholmod3
libchromaprint1 libcolamd2 libcupsfilters1 libcupsimage2 libgegl-0.3-0 libgimp2.0 libgme0 libgs9 libgs9-common libijs-0.35 libilmbase12 libjbig2dec0 libmetis5 libmng1
libmpg123-0 libnspr4 libnss3 libopenexr22 libopenmpt0 libpaper-utils libpaper1 libpoppler-glib8 libpoppler64 libraw15 libsdl1.2debian libssh-gcrypt-4 libsuitesparseconfig4
libswscale4 libumfpack5 libvorbisfile3 libwmf0.2-7 poppler-data
0 upgraded, 47 newly installed, 0 to remove and 0 not upgraded.


So, what I do to make fonts render properly, on a minimal Debian installation, with just a Window Manager (like Fluxbox) to deal with graphics, is the following:

1) Install/use the program "LXAppearance" (which, even if it's not really necessary, I believe is a good thing to do, anyway, so that I can also configure other graphical aspects)

2) Create the files "~/.Xdefaults" and "~/.config/fontconfig/fonts.conf" as described here: https://bbs.archlinux.org/viewtopic.php ... 0#p1236040

3) Copy the configuration in "~/.Xdefaults" to "~/.Xresources"

4) Install GIMP (which surely will be useful for me, anyway, in the future)

5) (While not forgetting to install the "ttf-mscorefonts-installer" package, so that I can correctly render Windows fonts.)
I just *love* the stability, and also the modular installation options, of Debian. Apart from the unfortunate adoption of "systemd" (viewtopic.php?f=20&t=129881&start=165#p671030) this distribution is *great*.
User avatar
Fernando Negro
 
Posts: 112
Joined: 2013-11-24 01:29
Location: Portugal

Re: [SOLVED] How to make Openbox font rendering equal to XFC

Postby shep » 2018-08-11 23:32

OpenBox users often try to have a light, minimal interface which comes at the expense of "click to configure" applications like lxappearance.
Whether Gnome, KDE or XFCE4, these appearance apps write the same configuration files. You can write configuration files directly, either system wide or per user.
See this Arch wiki for details:
https://wiki.archlinux.org/index.php/Font_configuration
shep
 
Posts: 222
Joined: 2011-03-15 15:22


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable