Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
Fernando Negro
Posts: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#1 Post by Fernando Negro »

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, much more bug-free nature, and 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
debiman
Posts: 3063
Joined: 2013-03-12 07:18

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

#2 Post by debiman »

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
Fernando Negro
Posts: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#3 Post by Fernando Negro »

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, much more bug-free nature, and 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: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#4 Post by Fernando Negro »

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, much more bug-free nature, and 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: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#5 Post by Fernando Negro »

Please, "Help" me! ;)

Image
I just *love* the stability, much more bug-free nature, and 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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#6 Post by Head_on_a_Stick »

Fernando Negro wrote:~/.Xdefaults
I don't think all programs read that.

Try

Code: Select all

cp ~/.Xdefaults ~/.Xresources
deadbang

User avatar
Fernando Negro
Posts: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#7 Post by Fernando Negro »

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

Image
I just *love* the stability, much more bug-free nature, and 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: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#8 Post by Fernando Negro »

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, much more bug-free nature, and 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: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#9 Post by Fernando Negro »

Thank you also, debiman, for all your patience, help and availability. :)
I just *love* the stability, much more bug-free nature, and 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
debiman
Posts: 3063
Joined: 2013-03-12 07:18

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

#10 Post by debiman »

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
Fernando Negro
Posts: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#11 Post by Fernando Negro »

(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, much more bug-free nature, and 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*.

shep
Posts: 423
Joined: 2011-03-15 15:22

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

#12 Post by shep »

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

User avatar
Fernando Negro
Posts: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#13 Post by Fernando Negro »

Fernando Negro wrote: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.)
Addendum:

If anyone wants to do the same thing in Debian 10 (Buster),

I've just come here to add that, for some unknown reason, you'll have to also...

6) Install the "fonts-texgyre" package

...so that the "Book Antiqua" and "Helvetica" fonts are properly displayed.
I just *love* the stability, much more bug-free nature, and 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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#14 Post by Head_on_a_Stick »

Fernando Negro wrote:Create the files "~/.Xdefaults" and "~/.config/fontconfig/fonts.conf" as described here: https://bbs.archlinux.org/viewtopic.php ... 0#p1236040
^ This is totally unnecessary for Debian buster.

Use this to set the font configuration options:

Code: Select all

# dpkg-reconfigure fontconfig fontconfig-config
deadbang

User avatar
Fernando Negro
Posts: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#15 Post by Fernando Negro »

Thanks for the tip, Head_on_a_Stick.

I had done it, already (that second step I had listed) - and, at least it didn't mess up anything... :)

And, although everything seemed to be working fine already, I anyway executed the commands you mentioned.

(Just a case of redundancy, I suppose...)
I just *love* the stability, much more bug-free nature, and 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: 124
Joined: 2013-11-24 01:29
Location: Portugal
Has thanked: 2 times

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

#16 Post by Fernando Negro »

And, just to clarify something...

When I made the initial posts on this thread, I ended up mixing two different problems - which were,

(1) the rendering of the fonts, indeed, and

(2) the fact that Debian wasn't using a correct equivalent to (or substitute for) some fonts.

With all this being the difference between what was discussed

(1) here - http://forums.debian.net/viewtopic.php? ... 15#p710378 - and

(2) here - https://ubuntuforums.org/showthread.php?t=2400583.

Sorry about that... I didn't know anything about fonts, at first - and, because of that, I didn't even know how to properly express the problems I had.
I just *love* the stability, much more bug-free nature, and 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*.

Post Reply