How to set default font-size in TChromium

Post Reply
tad.chen
Posts: 24
Joined: Fri Jan 04, 2019 1:39 am

How to set default font-size in TChromium

Post by tad.chen » Tue Jan 14, 2020 9:56 am

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!

User avatar
salvadordf
Posts: 2504
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to set default font-size in TChromium

Post by salvadordf » Tue Jan 14, 2020 10:51 am

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.

tad.chen
Posts: 24
Joined: Fri Jan 04, 2019 1:39 am

Re: How to set default font-size in TChromium

Post by tad.chen » Wed Jan 15, 2020 2:16 am

Thank you for your help!

Post Reply