]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
add an ifdeffed out font size workaround
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 9 Dec 2010 05:54:14 +0000 (06:54 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 9 Dec 2010 05:54:14 +0000 (06:54 +0100)
libs/gtkutil/glfont.cpp

index bd514a7febbb1f592cefe6174cafcd0da1303cfd..a3eac91de0d160167775bc15210b0918d76deb2e 100644 (file)
@@ -220,6 +220,12 @@ class GLFontInternal: public GLFont
                // TODO fallback to fixed 8, courier new 8
 
                layout = pango_layout_new(ft2_context);
+
+#ifdef FONT_SIZE_WORKAROUND
+               pango_layout_set_width(layout, -1); // -1 no wrapping.  All text on one line.
+               pango_layout_set_text(layout, "The quick brown fox jumped over the lazy sleeping dog's back then sat on a tack.", -1); // -1 null-terminated string.
+#endif
+
 #if !PANGO_VERSION_CHECK(1,22,0)
                PangoLayoutIter *iter;  
                iter = pango_layout_get_iter(layout);