You are not logged in.
Pages: 1
I saw mentioned on this forum that you can add a line of code to the gtk3 css file that allows user to specifiy font size used by a specific program.
In the example, Thunar was used. I have been using this trick for a while now but I have some other questions about what is possible as far as font sizes in Xfce.
1.) Is it possible to add some kind of option to a programs launch command that would allow the same effect as this gtk3 css file trick?
So that say for example you want to have two diifferent instances of Thunar, that each load with a different font size.
(I thought I actually read something about this on this forum in the past, but this would be a good place to ask.)
2.) The trick mentioned allows user to change all the font sizes using one number value, which applies to every font in the program. Is there a way in Xfce to get even more specific with a specific programs font size?
Meaning can you add other code items to the gtk3 css file to change specific fonts within a program, such as fonts for Menu Bar, Tabs, Status Bar, etc.?
Thank You
Offline
1.) Is it possible to add some kind of option to a programs launch command that would allow the same effect as this gtk3 css file trick?
So that say for example you want to have two diifferent instances of Thunar, that each load with a different font size.
Not easily. If you have the thunar daemon running, it will always re-use the theme that was active when the daemon restarted. With some apps you can force a different GTK theme at app startup using the "GTK_THEME" variable, for example:
GTK_THEME=Greybird mousepad
...and it will force Greybird to use another theme. However, separate gtk.css files are supported so you would need to create custom themes and use them.
(I thought I actually read something about this on this forum in the past, but this would be a good place to ask.)
2.) The trick mentioned allows user to change all the font sizes using one number value, which applies to every font in the program. Is there a way in Xfce to get even more specific with a specific programs font size?
Meaning can you add other code items to the gtk3 css file to change specific fonts within a program, such as fonts for Menu Bar, Tabs, Status Bar, etc.?
For GTK prorgams, probably yes. If you can give an example of a program and the fonts to change, I can examples of CSS tweaks to adust those fonts.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Lately I have been having a terrible time with tiny, unreadable fonts in about a quarter of the programs I have installed in SparkyLinux. It is based on Debian Stable and has an unusual way of handling desktop environments; there is just one ISO, but the first time it boots you are presented with your choice of ten or so different desktop environments. I selected Xfce, and haven't looked back.
The problem is that I have a 4K (3840x2160) monitor, and in a lot of programs the fonts are so tiny that the program is unusable. One such program is Jubler, a subtitle editor that is currently distributed via appimage. I queried the devs about the problem and received a reply:
'XFCE4 unfortunately is not HiDPI aware. I myself am using two HiDPI monitors, both of them in 4K resolution. Indeed on an environment not compatible with HiDPI the letters are impossible to read.'
I've been using Xfce for years, but I've never heard this before. Is it correct that my problem lies within Xfce? Is there a solution?
Last edited by John Jason Jordan (2023-09-27 08:34:41)
Offline
It really depends on the program that is causing the issue. Jubler is a java program.
Xfce does support scaling - you need to go to Settings Manager > Display and adjust the scale box (the lower the number the larger the size of the elements). This will affect all elements on the screen (especially useful for HiDPi screens).
Also, java programs now support the GDK_SCALE variable, so you could start Jubler with something like:
GDK_SCALE=1.5 Jubler...
...to get just its elements to size up.
Here is some more info on options to resize java applications.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
@ToZ
I am sorry I missed your response (#2 above)
2.) Okay how about Thunar? Changing specific fonts such as
-Menu bar
-Tabs
-Status bar
I don't think you can get as specific as
-File Pane
-Folder Tree Sidebar
-Bookmark Places Sidebar
although these all fonts change when you use the global font size trick with Thunar in the css file so maybe?
Once I see the general idea from your examples, I assume / will try to apply them to other programs and see if they work for them as well.
Thanks again
Offline
-Menu bar
.thunar menubar menuitem label {font-size: 16pt}
-Tabs
.thunar .reorderable-page label {font-size: 24pt}
-Status bar
.thunar statusbar box label {font-size: 6pt}
-File Pane
.thunar .standard-view .view {font-size: 24pt}
-Folder Tree Sidebar
-Bookmark Places Sidebar
.thunar .sidebar .view {font-size: 32pt}
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
@ToZ
Thank you so much for your response.
Wow, I didn't think that XFCE would be able to get this specific with font sizes, this is great information. Now you got me thinking... how specific can we go....
Do you by any chance know if there is one for
-Thunar - Address Bar (Location Bar)
-Thunar - Context Menu (RMB click)
I think these two above would cover pretty much every available font in a program.
This I would imagine not possible but worth asking.
I noticed that the one for the file pane font size also applies to the column headers (if using "Detail" view)
I get why it does but don't personally like this, do you know there are any to split these two items and apply font size separately?
-File pane font
-File pane column header labels ("Details" view)
I didn't get to test much more than applying this to Thunar, I still have to see how these apply with other 3rd party programs. I did however try something that made me ask another question.
Might be a little tricky, but do you know if there is coding that can allow this to be applied to Appimages?
I tried for example the following two guesses but neither worked.
.~/Downloads/<appimagename>.appimage menubar menuitem label {font-size: 16pt}
.$HOME/Downloads/<appimagename>.appimage menubar menuitem label {font-size: 16pt}
Global XFCE font setting applies to Appimages so it is possible, but not sure if possible in this context of specific programs.
I have said similar things before, but you provide such quality answers, not just for me but for everyone in this community, very helpful, thank you again.
Last edited by advice1010 (2023-10-23 21:26:57)
Offline
I was also going to make a separate post about the ability to change icon sizes for specific programs as well, but I have seen you mention that this is no longer supported in gtk3 which is strange. I have seen you mention that a "scale" can be used but have not tried it yet.
Main icons I can think of within a program would be for example using Thunar....
Thunar - Toolbar Icon Sizes
Thunar - Menu Bar Icon Sizes
Thunar - Context Menu Icon Sizes
Last edited by advice1010 (2023-10-23 21:42:01)
Offline
-Thunar - Address Bar (Location Bar)
.thunar toolbar entry {font-size: 64pt}
-Thunar - Context Menu (RMB click)
I don't believe its possible to affect this only at the thunar level - its a gtk3-wide setting.
This I would imagine not possible but worth asking.
I noticed that the one for the file pane font size also applies to the column headers (if using "Detail" view)
I get why it does but don't personally like this, do you know there are any to split these two items and apply font size separately?
-File pane font
-File pane column header labels ("Details" view)
You can further set the header label font via:
.thunar .standard-view .view label {font-size: 12pt}
Might be a little tricky, but do you know if there is coding that can allow this to be applied to Appimages?
Unfortunately I don't have any experience with appimages. It would depend on whether they are GTK3 and what styles they have available. Try running the appimage like this:
GTK_DEBUG=interactive appimage
...to see what comes up.
I'll see if I can install an appimage to have a closer look.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I was also going to make a separate post about the ability to change icon sizes for specific programs as well, but I have seen you mention that this is no longer supported in gtk3 which is strange. I have seen you mention that a "scale" can be used but have not tried it yet.
It is possible using the "-gtk-icon-transform" function.
Thunar - Toolbar Icon Sizes
To do all of them:
.thunar toolbar toolbutton image {-gtk-icon-transform: scale(0.5);}
To get individual icons:
.thunar toolbar toolbutton:nth-child(1) image {-gtk-icon-transform: scale(0.5);}
...where nth-child is the icon in order as it appears.
Thunar - Menu Bar Icon Sizes
.thunar menubar menuitem image {-gtk-icon-transform: scale(0.5);}
Thunar - Context Menu Icon Sizes
These don't seem to work unfortunately for the same reason, I believe, as the previous comment. For example, if you:
menu image {-gtk-icon-transform: scale(0.5);}
...it will scale it but for all GTK3 apps.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
@ToZ
Man, thank you so much for all of this.
Give a little time and I will try this stuff out.
Wow didn't think the headers would be possible.
Context Menus
Okay so the context menus cannot be done specifically.
So they can be done on a global level which applies to all context menus?
I might want to mess around with this, do you know where this setting is?
Is it a line of code that goes in the same gtk.css file but just applies to DE / all programs?
I have only been able to change their size with the XFCE global font setting which as mentioned applies to everything.
I can look this up more, I just figured I would ask because you mentioned it.
Appimages
Just to point out the appimage that I did my testing on was a gtk2 based application.
I figured that might be an issue, there isn't a gtk.css file in the gtk2.0 folder like there is with the gtk3.0 folder.
I just figured I would try because as mentioned that application does seem to response to global font settings / icons.
I will test some other gtk3 based appimages as well to see if maybe I see what is possible.
Thank you again for all your help, looks like some great stuff to test out.
Last edited by advice1010 (2023-10-24 22:23:28)
Offline
Pages: 1