GNOME Bugzilla – Bug 736826
clutter_text_set_font_name invalid example using "pt"
Last modified: 2014-09-22 11:03:16 UTC
This example does not work for me (with Python, clutter-1.18.4, pango-1.36.5): clutter_text_set_font_name (text, "Sans 10pt"); https://git.gnome.org/browse/clutter/tree/clutter/clutter-text.c#n4880 The pt modifier appears to cause the size to be ignored. Seems to be borne out by the referenced documentation for pango_font_description_from_string https://developer.gnome.org/pango/unstable/pango-Fonts.html#pango-font-description-from-string which only mentions a px modifier. Demonstration in Python: from gi.repository import Clutter, Gtk, GtkClutter GtkClutter.init(None) a = Clutter.Actor() a.set_size(100, 100) t = Clutter.Text() t.set_font_name("Sans 32") t.set_text("Sans 32") t1 = Clutter.Text() t1.set_position(0, 100) t1.set_font_name("Sans 32pt") t1.set_text("Sans 32pt") win = GtkClutter.Window() win.connect("delete-event", Gtk.main_quit) stage = win.get_stage() stage.add_child(t) stage.add_child(t1) win.show_all() Gtk.main()
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.