In my preference dialog I have a Gtk.FontButton for the user to select a font, later I create a new Pango.FontDesciption from the get_font_name () string. The problem is that the size for the font is never set.
var font = new Pango.FontDescription ();
var font_name = Window.SETTINGS.get_string ("room-font");
font.from_string (font_name);
stdout.puts (@"Font: $font_name, Size: $(font.get_size())");
This prints Font: Sans 12, Size: 0
.
The documentation for from_string says "SIZE is a decimal number (size in points) or optionally followed by the unit modifier "px" for absolute size." which would seem to indicate that the size in Sans 12
is formatted wrong. But the documentation for FontButton says "If you want to render something with the font, use this string with from_string".
What am I missing here?