Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

How to set default font-size in TChromium

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

How to set default font-size in TChromium

Post 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!
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to set default font-size in TChromium

Post 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.
tad.chen
Posts: 104
Joined: Fri Jan 04, 2019 1:39 am

Re: How to set default font-size in TChromium

Post by tad.chen »

Thank you for your help!
Post Reply