GNOME Bugzilla – Bug 724996
Font Button too many decimal places
Last modified: 2014-08-15 19:10:43 UTC
In my code, I provide a tool to increase or decrease font size by a small proportion. I create a string containing the font family name, and the resulting size rounded to 2 decimal places, then use that in gtk_font_button_set_font_name(). The result is a font button displaying 4 decimal places, which I'm sure the user does not need to see. I'm guessing that the string is parsed, then the size is converted to PANGO_SCALE units, then for the button converted back to decimal without appropriate rounding. e.g. I use "Sans 12.15" as the argument to set_font_name, but the button has 12.1504
Please provide a minimal testcase. Also, testing on a more recent GTK version is welcome in case you really still use 3.4.