Page 1 of 1

How to set default font-size in TChromium

Posted: Tue Jan 14, 2020 9:56 am
by tad.chen
I want to change default font-size used in TChromium, but have not found a DEMO. It seams that the struct TCefBrowserSettings can be used to do it. because there're some variables of it such as default_font_size, fixed_font_family and so on which are related to font's setting. But I don't know how to do it. Is there a DEMO? Thanks!

Re: How to set default font-size in TChromium

Posted: Tue Jan 14, 2020 10:51 am
by salvadordf
Hi,

There's no demo showing how to change those properties but you can test them with BriskBard.
The configuration form for the web browser tabs have a "Fonts" tab with all those settings.

If you need to use a custom fixed font you need to set TChromium.FontOptions.FixedFontFamily with one of the font names found in "Screen.Fonts".
To set a different default font size set the TChromium.FontOptions.DefaultFontSize property with a custom "TFont.Size" value. If I remember correctly, 0 means that CEF uses the default size.

Re: How to set default font-size in TChromium

Posted: Wed Jan 15, 2020 2:16 am
by tad.chen
Thank you for your help!