[Webkit-unassigned] [Bug 142673] [GTK] Automatically adjust font size when gtk-xft-dpi changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 5 03:15:33 PST 2017


--- Comment #40 from Gabriel Ivașcu <givascu at igalia.com> ---
(In reply to Carlos Garcia Campos from comment #39) 
> That would still be inconsistent because new properties in points will have
> the -pts suffix, but minimum-font-size will be in point without the -pts
> suffix. What I don't like about adding new properties is that changing one
> property will affect two properties, because of both are changing the same
> internal value. They are not two properties but two ways of expressing the
> same property. So, adding methods to set the same property in other units
> makes it clear that we are changing the same thing.

I understand what you're saying. My reasoning was that:

1) Users would not use both set of properties at the same time, since the first set would be deprecated.

2) Eventually the pixels properties will be completely removed in a future version, and then the points properties will take their place and so there will be only one set of properties.

> I'm not sure that's always the case. In a GNOME desktop environment with
> gnome-settings-daemon, and GTK+ providing accurate information about the
> DPI, that's for sure the case. But in a embedded device, with not desktop
> and not using any toolkit at all (WPE), that targets a specific screen where
> you know the DPI, you might want to move the conversions to the app side
> instead of using the default one provided by WebCore.

I admit, I only took into consideration the case of a desktop environment. You definitely have more knowledge about this stuff.

> I agree, and again that's the case of desktop applications in a desktop
> environment with system preferences.


> Yes, I agree it's more convenient to use g_object_set() in that case, but I
> don't think it's enough reason. We could add global functions to convert
> between pixels/points instead of making them part of WebKitSettings, that
> way you could keep using g_object_set().

In either design we choose, apps would not really need their own functions to convert between points and pixels anymore. That implies calculating the screen DPI, and WebCore would already be doing that in PlatformScreen. Apps would use the setter method for points and the conversion will be made internally by WebKitSettings with the DPI from WebCore.

> I still think it's better to not duplicate the properties for the reasons
> I've just exposed, but that doesn't mean the decision is made, so don't
> change the patch yet.

OK, since I didn't really consider the case of embedded devices where apps might want to do their own conversions, I think we can keep the properties in pixels and only add methods for font sizes in points that the desktop environment apps could use.

Maybe Michael can have the final say on this?

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171105/4b2f56c1/attachment-0001.html>

More information about the webkit-unassigned mailing list