[wpe-webkit] How to write a config file to configure the browser

Adrian Perez de Castro aperez at igalia.com
Fri Apr 24 00:58:53 PDT 2020


Hello Abhishek,

On Thu, 23 Apr 2020 10:53:03 +0530, Abhishek Hegde <abhishek.hegde at yandex.com> wrote:
 
> I noticed that cog cmd has an argument called ‘config’. So far I have used
> only ‘platform’ argument to specify backend as fdo. But I need to configure
> the browser settings as well. So can someone explain the syntax to write a
> config file or provide an example file ?

The configuration file uses an INI-style format [1], currently only the
“websettings” section is recognized. This allows configuring the properties
of the WebKitSettings [2] object used by Cog. Properties of boolean, string,
and integer will be loaded, For example, you could set the default fonts
with a configuration file that looks like this:

        [websettings]
        default-font-family = Source Sans Pro
        sans-serif-font-family = Source Sans Pro
        monospace-font-family = Source Code Pro
        serif-font-family = Source Serif Pro
        default-font-size = 13
        default-monospace-font-size = 13

Then you can run with “cog -P fdo -c settings.conf …“

I hope this helps =)
—Adrián

[1] We use GKeyFile: https://developer.gnome.org/glib/stable/glib-Key-value-file-parser.html
[2] https://wpewebkit.org/reference/wpewebkit/unstable/WebKitSettings.html#WebKitSe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20200424/244dea99/attachment.bin>


More information about the webkit-wpe mailing list