[Webkit-unassigned] [Bug 142673] [GTK] Add settings to set font size in points, and deprecate the pixel size settings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Nov 4 07:13:58 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=142673

--- Comment #37 from Gabriel Ivașcu <givascu at igalia.com> ---
OK, as Carlos pointed out, I'll split this into two separate bugs and patches:

(1) Add functionality to handle font sizes in points.
(2) Handle DPI changes and scale the text accordingly.

I suggest keeping this bug for (2), as that was its original purpose, but for that I need to ask Michael to change the bug's name back to the original, since I don't have enough permissions.

And I'll open a separate bug for (1) with a smaller patch for it. But for this I'm not sure if we should fall back to the alternative design, where we keep the old font size properties in pixels, and only add setter/getter methods for the font size in points. I believe this isn't really the best approach, for reasons of usability and consistency.

I'll try to highlight below why I favor adding points properties and deprecating the pixels properties (which should be eventually removed for good):

A. It's a plus to consistency. Currently, "minimum-font-size" property is in points, whereas "default-font-size" and "default-monospace-font-size" are in pixels, which is already not too consistent. Splitting the default font size properties in both pixels and points, will break the consistency even more, whereas replacing the pixels properties with points properties will bring unity.

B. I think users should have to deal with raw pixels. And it's easier for them to understand that they are supposed to use only the points properties/methods from now on if they see that the pixels properties/methods are deprecated and will be removed in a future version. This is in contrast with keeping the pixels properties/methods and only adding points methods, which can be misleading and confusing: changing the pixels value will change the points value too and vice versa. (Of course, this would happen too if they would use both the new properties and the deprecated ones, but that would be their fault.)

C. It's easier for apps to handle font sizes in points rather than pixels, i.e. they can pass to WebKitSettings the font size value obtained directly from the user preferences. Furthermore, what apps currently do, is to set multiple font properties at once with g_object_set(). See https://git.gnome.org/browse/epiphany/tree/embed/ephy-embed-prefs.c?h=gnome-3-26#n354 and https://git.gnome.org/browse/devhelp/tree/src/dh-util.c?h=gnome-3-24#n168. Switching from pixels properties to points properties will only require changing the property names, whereas keeping the pixels properties and only adding points methods, will require calling the setter for points in addition to g_object_set().

If I'm missing something and you strongly believe that the font size properties in pixels should not be deprecated and/or removed, please let me know, so I would know what patch to upload to (1).

-- 
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/20171104/705885e0/attachment-0001.html>


More information about the webkit-unassigned mailing list