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

Abhishek Hegde abhishek.hegde at yandex.com
Fri Apr 24 07:20:13 PDT 2020


Dear Adrián,

This was very helpful.

Thanks & Regards,
Abhishek Hegde

From: Adrian Perez de Castro
Sent: 24 April 2020 13:29
To: Abhishek Hegde
Cc: webkit-wpe at lists.webkit.org
Subject: Re: [wpe-webkit] How to write a config file to configure the browser

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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20200424/e6f61533/attachment.htm>


More information about the webkit-wpe mailing list