Home | News | Download | Packages | Forum | Wiki | Github

Font configuration


#1

Hello all,

ive just installed Void Linux with openbox.
I have a really horrible font rendering at the moment and i dont have any clue how to fix it.

I used gentoo before, there was the configuration thanks to eselect a bit easier.
I read the article on the arch wiki here:
https://wiki.archlinux.org/index.php/Font_configuration
Created a system wide font configuration file and filled it with the xml code on the site.
But now it just looks so horrible its a real pain in the eye.

How do i configure fonts properly in void?
Ive read alot about the presets which you can link into your fonts directory for font rendering, but i cant find them on void linux.

any help is appreciated, greetings maxe.


(Masato the Empty) #2

Could it be selected fonts rather than rendering?
I wonder… Do you have the xorg-fonts metapackage installed?

I just jumped into an openbox session to see if I noticed anything (I regularly use xfce), and everything looks good. I have not touched font configuration on my system, enless you count installing more TTF fonts to support more unicode blocks (and I only installed the packages, no extra config needed).

In my openbox settings, everything is default, and the font used is “sans.” That appears to be “dejavu sans” in my case, though I couldn’t match a “sans” filename or a font named just plain “sans” in any of the fc commands, so that’s just a guess (I’m thinking it’s a font name that depends on whatever fonts are found. Not having had to worry about them in years, the details of font configuration has gotten away from me)

that font is part of the “dejavu-fonts-ttf” package which is a dependency of xorg-fonts. If “sans” on your system defaulted to something like “lucida typewriter sans” X11 font, then thigns would look horrible indeed (when I saw it, I thought I was back in 2001). xorg-fonts is only pulled in by the full xorg package, so if you manually installed individual packages, or just xorg-minimal metapackage, it wouldn’t be automatically installed.

If you’re actually having a font render issue, then a small screenshot like above might be telling, if you can take one (if might make your issue more visibly recognizable to others).


#3

Hey masato, thanks for the quick reply!
Here are two screenshots, one from the browser and one from my terminal(urxvt)

And here is a list of packages i have installed which have something to do with fonts:

[] cantarell-fonts-0.0.25_1 Cantarell family of TrueTy…
[
] dejavu-fonts-ttf-2.37_1 DejaVu family of TrueType …
[] encodings-1.0.4_5 X11 Font Index Generator
[
] font-adobe-100dpi-1.0.3_4 Standard 100dpi Adobe PCF …
[] font-adobe-75dpi-1.0.3_4 Standard 75pi Adobe PCF fonts
[
] font-adobe-utopia-100dpi-1.0.4_4 100dpi Adobe Utopia PCF fonts
[] font-adobe-utopia-75dpi-1.0.4_4 100dpi Adobe Utopia PCF fonts
[
] font-adobe-utopia-type1-1.0.4_4 Adobe Utopia Type1 fonts
[] font-alias-1.0.3_3 Standard aliases for X11 P…
[
] font-bh-100dpi-1.0.3_4 Standard 100dpi Bigelow an…
[] font-bh-75dpi-1.0.3_4 Standard 75dpi Bigelow and…
[
] font-bh-lucidatypewriter-100dpi-1.0.3_4 100dpi Bigelow and Holmes …
[] font-bh-lucidatypewriter-75dpi-1.0.3_4 75dpi Bigelow and Holmes L…
[
] font-bh-ttf-1.0.3_4 Standard Bigelow and Holme…
[] font-bh-type1-1.0.3_4 Standard Bigelow and Holme…
[
] font-bitstream-100dpi-1.0.3_4 Standard 100dpi Bitstream …
[] font-bitstream-75dpi-1.0.3_4 Standard 100dpi Bitstream …
[
] font-bitstream-type1-1.0.3_4 Standard Type1 Bitstream P…
[] font-cursor-misc-1.0.3_4 Standard X11 cursors in PC…
[
] font-daewoo-misc-1.0.3_4 Daewoo Gothic PCF format
[] font-dec-misc-1.0.3_4 DEC cursor and session PCF…
[
] font-ibm-type1-1.0.3_4 IBM Courier Type1 fonts
[] font-isas-misc-1.0.3_4 72dpi PCF versions of the …
[
] font-jis-misc-1.0.3_3 78dpi PCF versions of the …
[] font-misc-misc-1.1.2_5 Standard X11 fixed PCF fonts
[
] font-mutt-misc-1.0.3_4 100dpi PCF versions of the…
[] font-util-1.3.1_2 Tools for truncating and s…
[
] fontconfig-2.12.1_1 Library for configuring an…
[] freetype-2.7.1_1 Font rendering engine and …
[
] gohufont-2.1_1 Programming monospace bitmap
[] google-fonts-ttf-20160220_1 TrueType fonts from the Go…
[
] kbd-data-2.0.4_1 Linux keyboard utilities -…
[] libXfont-1.5.2_1 X font Library
[
] libXfontcache-1.0.5_1 X-TrueType font cache exte…
[] libXft-2.3.2_1 Library for configuring an…
[
] libfontenc-1.1.3_1 The fontenc Library from X…
[] mkfontdir-1.0.7_2 X11 Font Index Generator
[
] mkfontscale-1.1.2_1 X11 Scalable Font Index Ge…
[] pango-xft-1.40.3_1 Library for layout and ren…
[
] rxvt-unicode-9.22_4 Terminal emulator supporti…
[] rxvt-unicode-terminfo-9.22_4 Terminal emulator supporti…
[
] xorg-fonts-7.6_4 Modular Xorg Fonts

Also tried diffrent fonts, but no change.

While searching a bit more i found all the presets which are listed in the arch wiki articel. They were located in /usr/share/fontconfig/.
Ill try to configure the fonts again now but with the activated presets in this directory.


(Masato the Empty) #4

Aah! 2001!
But yeah, you’ve definitely got better fonts installed.

Oddly, what you show for your browser screenshot is pretty close to what I see if I select a lucida font, though it’s definitely not the font you’re showing (adjusting hinting makes it a little better, though not normal). But it only changes my DE fonts (I’m back in xfce) and doesn’t touch my browser (firefox). Additionally interesting is that in firefox, I only have the TTF/opentype fonts available, and same with chromium, so I can’t make the browser window look like your screenshot.

Yours looks like maybe subpixel rendering is turned off (something that you’d do if you’re on a CRT, since they don’t benefit from it). Might that have gotten disabled somehow? (again, since I never did anything with it, I assume it’s normally on by default…)

Your terminal window looks OK as far as rendering goes, for the most part. It’s picked a wider/rounder font than I’m used to reading, not sure if that’s the font you want to see, or something else.

If you locate the issue, let us know. It’s good to have the solutions up for anyone seeing it later.


#5

Hello @maxe ! Your fonts looks as if the “hinting” was not activated. :frowning2:

Have you looked at this section on the Arch wiki ?

Create a new ~/.Xresources, or ~/.Xdefaults file with the good settings for your needs.


For example my ~/.Xdefaults looks like this:

Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.rgba: none
Xft.dpi: 118

About DPI settings I found this interesting website to test your screen DPI.
96 DPI is not a standard, I’m using 118 right now.


#6

For urxvt, I have this on my ~/.Xdefaults file:

URxvt*termName: rxvt-256color
URxvt*geometry:   100x40
URxvt*shading:15
URxvt*saveLines:6000
URxvt*foreground:#FFD7AF
URxvt*background:#262626
URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=14.5
URxvt*boldFont: xft:Bitstream Vera Sans Mono:bold:pixelsize=14.5
URxvt*color4:RoyalBlue
URxvt*scrollBar:true
URxvt*scrollBar_right:true
URxvt*scrollBar_floating: true
URxvt*scrollstyle:rxvt
URxvt*cursorColor:pink
URxvt*keysym.Home:\033[1~
URxvt*keysym.End:\033[4~
URxvt*iso14755:false
URxvt*iso14755_52:false
URxvt*urlLauncher: /usr/bin/firefox -new-tab
URxvt.url-select.underline: true
URxvt*cutchars:`"()'*<>[]{|}"

You can try this configuration and compare the results.


#7

Thank you two for posting your .Xresources/.Xdefaults file, but since i also have the font issue in my browser, i dont think that the source of the problem lies there.

Yes i have already. Like i said i read the article and created a system wide configuration file in /etc/fonts/ with all the xml code from the arch wiki.
When loading this file, it doenst throw any error, so i guess it is correct.

Ill try to install the infinality bundle.
I read in other topics that it is bad and shouldnt be needed anymore, but i always increased the quality of my fonts.


#8

In XFCE I tried turning off antialiasing for the desktop once and all the fonts looked horrible everywhere. Antialiasing makes curves and diagonals look less blocky and pixellated.
In XFCE you go to Settings > Appearance > Fonts and there is a check box, but I don’t know what your equivalent would be, or if that is even the problem.


#9

@maxe I use Openbox like you, and I’m happy with these simple settings, look…


#10

Hello all,
sorry for not responding for a while, my ssd died somehow and it took me a while to get everything up again.
So, i installed void again because its a great distro.
This time, i picked xfce because of the font problems i had with openbox.
Everything looked greate, after some tweaks here and there it was perfect.

But it bugged me that i couldnt get that configuration in openbox, so i copied the configuration created by xfce and pasted it in the system wide font config folder. After that, i had the same configuration in openbox.
Really no clue why i coudnt get that in the first place, because it was exactly like i configured it by hand.

Thanks to all for the help! Really awesome to see such a young community so helpfull!
Also thanks alot to cr6 for your gtk settings, thoose helped me quite a bit :wink: