Terrence,

You nearly had it right the first time.

You need the "#" in front of the selector:

  "#gnc-id-main-window"

The initial post you made left off the '#' sign at the beginning. If it is not there in your CSS file, that would be why it didn't work. That symbol indicates a CSS 'id' and without it, a 'named node'. If the node is not named as such, but does have that id, then your rule without the symbol will never work.

Also, I'm surprised the wiki doesn't show this, but I'm fairly certain you have to quote font family names that have spaces in them. It is also good practice to provide a generic fallback, such as 'serif' or 'sans-serif' etc. This way, if for some reason you didn't name the font just right, you should still see some sort of change. (assuming the generic is different than the default.) There is a way to find the proper name with a font viewer where you can see the font meta data. In this case, it might just be 'Calibri', though I'm not certain.

Finally, play with other units such as 'px' or 'em'. Some work with GTK in some contexts and others do not. I haven't found the rhyme or reason yet. You might also find success with named sizes like 'medium', 'large' or 'x-large'.

-----

Of note, the wiki explicitly states that the wild-card selector "*" does *not* work on Windows.

If you still can't get it to work, try the settings.ini method.

Regards,
Adrien

On 12/20/22 11:15 PM, TERRENCE BRANSCOMBE wrote:
Yeah, had precisely what you had in your screenshot.

Here is what is now in my gtk-3.0.css file:

/* Application wide font setting */
* {
font: 18px Microsoft Consolas;
}

No visible result, I'm afraid.

Cheers,
Terry


From: "Glenn Fowler" <gfowl...@outlook.com>
To: "TERRENCE BRANSCOMBE" <tlbransco...@shaw.ca>
Cc: "GnuCash users group" <gnucash-user@gnucash.org>
Sent: Tuesday, December 20, 2022 6:18:54 PM
Subject: Re: [GNC] Changing typeface using CSS (Windows 10)

It would be the "Roaming" folder. There is probably a syntax error. Just 
copy/paste the whole thing, save, and restart GnuCash.


On Tue, Dec 20, 2022 at 2:34 PM TERRENCE BRANSCOMBE < [ 
mailto:tlbransco...@shaw.ca | tlbransco...@shaw.ca ] > wrote:



Thanks for the suggestion, Glenn.

I tried this in both the "Roaming" and the "Local" versions of the gtk-3.0.css 
file; but, neither had any effect on the typeface I see.

Also, I did see you used "24px" whereas I had "24pt" originally, so I went with 
your suggestion.

Terry


From: "Glenn Fowler" < [ mailto:gfowl...@outlook.com | gfowl...@outlook.com ] >
To: "TERRENCE BRANSCOMBE" < [ mailto:tlbransco...@shaw.ca | tlbransco...@shaw.ca ] 
>
Cc: "gnucash-user" < [ mailto:gnucash-user@gnucash.org | gnucash-user@gnucash.org 
] >
Sent: Monday, December 19, 2022 3:43:07 PM
Subject: Re: [GNC] Changing typeface using CSS (Windows 10)

This should work:

/* Application wide font setting */

* {
font : 24px Microsoft Calibri;
}

On Mon, Dec 19, 2022 at 6:33 PM TERRENCE BRANSCOMBE < [ 
mailto:tlbransco...@shaw.ca | tlbransco...@shaw.ca ] > wrote:

BQ_BEGIN
Hello all,

I've been a user for all of 2 weeks, so I apologize to everyone if this 
question/subject has been beaten to death in the past. My research online has 
not resulted in a fix, though, so I'd like to ask: has anyone running gnucash 
4.12 or 4.13 on Windows 10 managed to change font families using CSS ? The 
documentation I've found on the subject suggests Windows users can change 
typefaces using CSS by editing the file GNC_CONFIG_HOME/gtk-3.0.css by adding a 
section like this :

/* Application wide font setting */
gnc-id-main-window {
font-family: Microsoft Calibri;
font-size: 24pt;
}

Following these directions I edited the file gtk-3.0.css in the folder 
C:\Users\<username>\AppData\Roaming\GnuCash with the setting shown above; but, 
upon restarting gnucash I see absolutely no font change whatsoever. For grins, I 
copied this file to the AppData\Local\GnuCash directory as well, and again restarted 
gnucash. Sadly, same non-result.

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to