Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-09-17 22:22:13

advice1010
Member
Registered: 2023-02-19
Posts: 30

Font sizes within programs

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

#2 2023-09-18 23:50:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,505

Re: Font sizes within programs

advice1010 wrote:

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

#3 2023-09-27 08:33:59

John Jason Jordan
Member
Registered: 2019-11-22
Posts: 76

Re: Font sizes within programs

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

#4 2023-09-27 11:08:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,505

Re: Font sizes within programs

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

Board footer

Powered by FluxBB