You are not logged in.
Pages: 1
Hello all. I would like GTK application to use custom font GTK.
I searched the Internet, but found nothing useful.
Help please
Last edited by wire7ack (2019-08-28 19:35:23)
Offline
Hi wire7ack,
you might want to have a look at this wiki article. It lists some GUI tools you can try out and directly below them, you can see basic configuration example where it looks like one can tweak the fonts aswell.
https://wiki.archlinux.org/index.php/GT … tion_tools
Offline
Hi wire7ack,
you might want to have a look at this wiki article. It lists some GUI tools you can try out and directly below them, you can see basic configuration example where it looks like one can tweak the fonts aswell.
https://wiki.archlinux.org/index.php/GT … tion_tools
Thanks for the answer. I understood how to change the theme for the application, but I did not understand how to change the font by this analogy
Offline
If I read this correctly (https://wiki.archlinux.org/index.php/GTK#Configuration) changing the font for GTK3 apps can be done under
$XDG_CONFIG_HOME/gtk-3.0/settings.ini
by changing the gtk-font-name
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = DejaVu Sans 11
Have you tried this yet?
Offline
If I read this correctly (https://wiki.archlinux.org/index.php/GTK#Configuration) changing the font for GTK3 apps can be done under
$XDG_CONFIG_HOME/gtk-3.0/settings.ini
by changing the gtk-font-name
[Settings] gtk-icon-theme-name = Adwaita gtk-theme-name = Adwaita gtk-font-name = DejaVu Sans 11
Have you tried this yet?
Thanks for answer, but I think I asked the wrong question. I wanted to change the font as you answered, but not for all GTK applications, but only for a certain.
Offline
Is this link helpful? https://stackoverflow.com/questions/327 … pplication
"Give a man a truth and he will think for a day. Teach a man to reason and he will think for a lifetime"
Offline
For gtk2 applications you can set GTK2_RC_FILES instead of messing up your global config path and firefox et al. will largely ignore your gtk config itfp.
=> It matters a lot, what "application" actually is.
Offline
Thanks for the answers, but my problem remains unresolved
Offline
See seth's comment
=> It matters a lot, what "application" actually is.
Unless you are more transparent here all anyone can do is give you random suggestions, which specific applications do you want to do this with?
Offline
See seth's comment
seth wrote:=> It matters a lot, what "application" actually is.
Unless you are more transparent here all anyone can do is give you random suggestions, which specific applications do you want to do this with?
Oh, chromium
Offline
Chromium is not a gtk application by any stretch - and things get more complicated: what part of chromium are you concerned about? Content, UI, the web inspector, …?
And because I sense this is gonna end up being an xy-problem: why exactly do you want to alter that font specific to chromium?
Offline
@sevendogs has provided a link in which there is a solution.
It is not optimal (immature) but effective.
mkdir -p ~/.config/cr1/gtk-3.0
printf "[Settings]\ngtk-font-name = DejaVu Sans 10\n" > ~/.config/cr1/gtk-3.0/settings.ini
ln -s ~/.config/chromium ~/.config/cr1
XDG_CONFIG_HOME=$HOME/.config/cr1 chromium
Offline
@sevendogs has provided a link in which there is a solution.
It is not optimal (immature) but effective.mkdir -p ~/.config/cr1/gtk-3.0 printf "[Settings]\ngtk-font-name = DejaVu Sans 10\n" > ~/.config/cr1/gtk-3.0/settings.ini ln -s ~/.config/chromium ~/.config/cr1 XDG_CONFIG_HOME=$HOME/.config/cr1 chromium
Thank you! You helped me a lot.
If you do not mind, I will ask you:
How to add this command to chromium.desktop. I tried so:
...
Exec=XDG_CONFIG_HOME=$HOME/.config/cr1 chromium
But the font remains the same
Offline
Maybe something like that.
...
Exec=env XDG_CONFIG_HOME=$HOME/.config/cr1 /usr/bin/chromium
or
You can create a shell script (wrapper) and place it ~/bin (in the your PATH) and give execute permission (chmod).
#!/bin/sh
XDG_CONFIG_HOME=$HOME/.config/cr1 /usr/bin/chromium "$@"
Offline
Maybe something like that.
... Exec=env XDG_CONFIG_HOME=$HOME/.config/cr1 /usr/bin/chromium
or
You can create a shell script (wrapper) and place it ~/bin (in the your PATH) and give execute permission (chmod).
#!/bin/sh XDG_CONFIG_HOME=$HOME/.config/cr1 /usr/bin/chromium "$@"
Thanks again. The second option helped me.
Offline
Pages: 1