GTK: Fix autoc font size on GTK >= 3.21.0
commitdb6f671135511bd107d18d512270503047eb19ac
authorColomban Wendling <ban@herbesfolles.org>
Tue, 6 Sep 2016 17:56:17 +0000 (6 19:56 +0200)
committerColomban Wendling <ban@herbesfolles.org>
Wed, 7 Sep 2016 09:05:17 +0000 (7 11:05 +0200)
tree5b021d4490553c0ab988065479fb6b7db6b8a1bb
parentbbdf56fc2e2c978de6a61c3be56dfeb5bc6963ef
GTK: Fix autoc font size on GTK >= 3.21.0

GTK 3.21.0 fixed font size handling, leading to properly interpreting
pixels and points in CSS declarations.  However, as older versions
incorrectly handled those, the code has to handle both behaviours.

From CSS, GTK < 3.21.0 actually applied the conversion to points, but
incorrectly: 10px was used as 10pt, but 10pt was scaled up twice.

So, assuming 96 DPI, it leads to:

font-size | 3.20.0  | 3.21.0  |
----------|---------|---------|
10px      | 13.33px | 10px    |
10pt      | 17.77px | 13.33px |

So, we need to fix the code to accommodate for both (either scaling
ourselves, or adapting the unit: I chose the second, simpler, option).

See https://git.gnome.org/browse/gtk+/commit/?id=df08fc91bdc1d2e4c866122304fabe4dd298a7de

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1859/
X-Scintilla-Commit-ID: a4b5da8b3a0a05a1e67ba7eb08474106d421b088
scintilla/gtk/PlatGTK.cxx