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
How to set default font-size in TChromium
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!
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to set default font-size in TChromium
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.
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
Thank you for your help!