Minimum font size.

I would like to change the minimum font size that the web pages are allowed to use.
I know that it breaks stuff, but that is what I’m doing in Firefox, and it works for me. And I’d prefer not to use the default zoom level for that, since convenient amount of scaling varies with each page.

Webkit2 webview has a field called minimum-font-size, which seems to do what I want. But I have no idea how to set it.

I am on the current master branch, so that’s a 3-something version.
This snippet might have done the thing in one of the old versions, maybe, but it leads to an error.

(defmethod ffi-buffer-make :after ((buffer gtk-buffer))
(let ((settings (webkit:webkit-web-view-get-settings (nyxt::gtk-object buffer))))
(setf (webkit:webkit-settings-minimum-font-size settings) 24)))

“Lock on package NYXT violated when interning GTK-OBJECT while in package NYXT-USER.”

I understand that I am not supposed to access the webview this way, but I have no idea what to do really.

You’re doing it right, fixing is just a matter of one edit! Given that you’re on current master, try using nyxt/renderer/gtk::gtk-object instead of nyxt::gtk-object—we’ve recently moved renderer-specific code to its own package and thus gtk-object method moved too :slight_smile:

1 Like

Sorry for the late reply.
It seems to have worked, thanks!