Avoid pango warnings by setting font family to "sans-serif" explicitely.
authorlunar <lunar@debian.org>
Thu, 14 Jun 2007 15:43:02 +0000 (15:43 +0000)
committerlunar <lunar@debian.org>
Thu, 14 Jun 2007 15:43:02 +0000 (15:43 +0000)
sm.c
sm.py

diff --git a/sm.c b/sm.c
index 0c4bd87..5a8d10d 100644 (file)
--- a/sm.c
+++ b/sm.c
@@ -156,6 +156,7 @@ int main(int argc, char **argv) {
        gtk_container_add(GTK_CONTAINER(window), vbox);
 
        font = pango_font_description_new();
+        pango_font_description_set_family(font, "sans-serif");
        pango_font_description_set_size(font, 20*PANGO_SCALE);
 
        layout=  gtk_widget_create_pango_layout(draw,get_text());
diff --git a/sm.py b/sm.py
index d94c86b..2a1b6a9 100644 (file)
--- a/sm.py
+++ b/sm.py
@@ -67,6 +67,7 @@ vbox.pack_start(hbox, expand=False, fill=False)
 window.add(vbox)
 
 font = pango.FontDescription()
+font.set_family("sans-serif")
 font.set_size(60*pango.SCALE)
 layout = draw.create_pango_layout(get_text())
 layout.set_font_description(font)