You are not logged in.
Hi guys,
I was wondering if there is a way to start an application with a different font that isn't defined by the GTK theme?
Changing the font of the theme changes it for all applications, while I want to start only Pcmanfm for example with another font. Some fonts don't do well with some applications.
I know there is a way to change the theme for individual applications by defining it in /usr/share/application/*.desktop file. Is there a similar way to change only the font somewhere?
Thanks in advance!
Last edited by HubbleT (2020-08-30 14:34:02)
Offline
Some fonts don't do well with some applications.
Please elaborate, this sounds like an xy-problem.
As for your question and gtk in particular, you can redirect the gtkrc for GTK2, https://wiki.archlinux.org/index.php/GTK#Themes for gtk3 I don't know if you get away w/ anything but redirecting $XDG_CONFIG_HOME, https://wiki.archlinux.org/index.php/GTK#Configuration
Offline
Some fonts don't do well with some applications.
Please elaborate, this sounds like an xy-problem.
I didn't mean to imply a technical problem, more a visual and aesthetic. VS code for example looks awkward with some of the fonts i want to use for other applications.
As for your question and gtk in particular, you can redirect the gtkrc for GTK2, https://wiki.archlinux.org/index.php/GTK#Themes for gtk3 I don't know if you get away w/ anything but redirecting $XDG_CONFIG_HOME, https://wiki.archlinux.org/index.php/GTK#Configuration
Unfortunately these are ways to change the theme for the entire system, there is even a way to force a application to use another theme.
So there probably isn't a "easy" way to force an application to use another font ![]()
Offline
No, they're not:
GTK2_RC_FILES=/path/to/my/gtkrc.specialfont pcmanfmThe special rc can eg. include other rcs and override values (eg for the font) edit: and will only apply to that pcmanfm process.
Last edited by seth (2020-08-29 08:59:20)
Offline
I didn't mean to imply a technical problem, more a visual and aesthetic. VS code for example looks awkward with some of the fonts i want to use for other applications.
Is VS a native GTK application? I'm not sure: It depends on electron7 which in turn depends on gtk3... a bit like Chromium I guess.
Can you not change the font from within VS code? Certainly for the editor itself!
So where are the bad, seemingly immutable fonts? In the UI, menus etc? I'm sure something can be done with some CSS magic. I don't know electron, but in Firefox this would definitely be possible. Electron theming?
Offline
Ok, so I found out a way to do it. Just changed the phrases I used when searching google for a solution.
This is what I came across: https://bbs.archlinux.org/viewtopic.php?id=248661, this even crossed my mind but I'm not so savvy in these things so didn't know how exactly to do it.
Thanks guys for the information you provided, much appreciated.
Last edited by HubbleT (2020-08-30 14:57:18)
Offline