After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736826 - clutter_text_set_font_name invalid example using "pt"
clutter_text_set_font_name invalid example using "pt"
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: Documentation
1.18.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-17 18:33 UTC by Chris Mayo
Modified: 2014-09-22 11:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris Mayo 2014-09-17 18:33:15 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()
Comment 1 Emmanuele Bassi (:ebassi) 2014-09-22 11:03:16 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.