You are not logged in.

#1 2019-05-03 11:42:54

meowmeow
Member
Registered: 2019-05-03
Posts: 1

Font Configuration

Hi, I'm using arch linux with  5.0.10-arch1-1-ARCH kernel, I've installed arch 1 week ago but I have a problem with the font configuration (the font is very small) in some programs.
I'm using i3wm and occasionaly KDE as desktop environment/window manager , and in both I changed the font of GTK and QT applications. However some programs like :
sddm (in the menu where I can change the DE),i3-nagbar,telegram and the ones based on AppImages displays a very small font and I have no idea where this font is configured on the system.
Also dmenu,rofi,and firefox (in some forums and sites) displayed a little font before I changed it. Where this font can be changed ?

Last edited by meowmeow (2019-05-03 11:43:57)

Offline

#2 2019-05-03 15:00:28

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 205
Website

Re: Font Configuration

for i3navbar you should change font from your i3 configurations file. for telegram you can set font size easily from its settings.
please post your fontconfig.
note that font family and size could be different for monospace, sans and sane serif.

Last edited by mmdamin (2019-05-03 15:02:37)

Offline

#3 2019-05-07 16:17:49

boban_dj
Member
Registered: 2015-03-17
Posts: 150

Re: Font Configuration

my dmenu font from ~/.i3/config

bindsym $mod+space exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -nb '#333333' -nf '#4AD5E1' -sf '#FFFFFF' -sb '#9F9F9F' -i -fn 'DejaVu Sans Mono-11' -l 20 -x 440 -y 300 -w 800"

my urxvt-unicode font from ~/.Xresources.d/urxvt-unicode

URxvt.font: xft:Dejavu Sans Mono:bold:style=Book:size=10:antialias=true:hinting=true

probably most other programs are from their settings

Offline

#4 2019-05-08 07:30:17

Alexey104
Member
Registered: 2018-08-11
Posts: 17

Re: Font Configuration

For gtk apps you can set up your fonts by modifying '~/.gtkrc-2.0' and '~/.config/gtk-3.0/settings.ini'(or '/root/.gtkrc-2.0' and '/root/.config/gtk-3.0/settings.ini' for system-wide fonts) files, for instance:

...
gtk-font-name=Droid Sans 11
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb
...

Some apps may not to be affected by antialias and hinting settings which these files consist. To fix it you can modify your '~/.Xresources', for example:

...
Xft.dpi:       94
Xft.antialias: true
Xft.hinting:   true
Xft.autohint:  false
Xft.rgba:      rgb
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
...

Edit this values according to your own preferences. Also add those settings to your '/etc/fonts/local.conf':

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="font">
        <edit name="antialias" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hinting" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
            <const>hintfull</const>
        </edit>
        <edit name="rgba" mode="assign">
            <const>rgb</const>
        </edit>
        <edit name="autohint" mode="assign">
            <bool>false</bool>
        </edit>
        <edit name="embeddedbitmap" mode="assign">
            <bool>false</bool>
        </edit>
        <edit name="lcdfilter" mode="assign">
            <const>lcddefault</const>
        </edit>
        <edit name="dpi" mode="assign">
            <double>94</double>
        </edit>
    </match>
</fontconfig>

For qt apps you can use qt5ct for setting up font size and type(don't forget to add 'export QT_QPA_PLATFORMTHEME=qt5ct' to your '/etc/profile').

Rofi fonts can be set in '~/.config/i3/config':

bindsym $mod+d exec rofi -font "Droid Sans Bold 11" -show drun
bindsym $mod+r exec rofi -font "Droid Sans Bold 11" -show run
bindsym $mod+Tab exec rofi -font "Droid Sans Bold 11" -show window

I3bar fonts can be set under the 'bar' section of '~/.config/i3/config':

bar {
  position top
font pango:Droid Sans bold 11
...
}

Sorry for my terrible English smile

Offline

#5 2019-05-08 15:38:03

loqs
Member
Registered: 2014-03-06
Posts: 17,436

Re: Font Configuration

Alexey104 wrote:

For gtk apps you can set up your fonts by modifying '~/.gtkrc-2.0' and '~/.config/gtk-3.0/settings.ini'(or '/root/.gtkrc-2.0' and '/root/.config/gtk-3.0/settings.ini' for system-wide fonts) files,

Only root should be able to access /root so how can that location be used for system-wide configuration?

Offline

#6 2019-05-08 16:58:31

Alexey104
Member
Registered: 2018-08-11
Posts: 17

Re: Font Configuration

loqs wrote:
Alexey104 wrote:

For gtk apps you can set up your fonts by modifying '~/.gtkrc-2.0' and '~/.config/gtk-3.0/settings.ini'(or '/root/.gtkrc-2.0' and '/root/.config/gtk-3.0/settings.ini' for system-wide fonts) files,

Only root should be able to access /root so how can that location be used for system-wide configuration?

Sorry, i said it wrong. Of course, these files have nothing to do with system-wide fonts. It is used by gtk apps running by root. For instance, if you run 'gksu pcmanfm', then pcmanfm will use these configs, otherwise, it will use configs from your home folder.

Last edited by Alexey104 (2019-05-08 17:38:26)

Offline

Board footer

Powered by FluxBB