summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-12-21 15:05:02 +0000
committerManolo Gouy <Manolo>2016-12-21 15:05:02 +0000
commit461750c38e1835e4a730e0f83a48fe090f41feae (patch)
treeeb7091c6cc46c06bfb47abe1ff5ca2c8ada3fa3d /src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
parent00ebcd23aa5e17dad822ab79584b0220341e1831 (diff)
X11 platform: Add optional use of the pango library to draw text, gaining the possibility to draw text in any script supported by Unicode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
index a8a5509fd..3986f4e95 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
@@ -57,8 +57,20 @@ Fl_Xlib_Graphics_Driver::Fl_Xlib_Graphics_Driver(void) {
p_size = 0;
p = NULL;
line_width_ = 0;
+#if USE_PANGO
+ pfd_ = pango_font_description_new();
+ Fl_Graphics_Driver::font(0, 0);
+#endif
}
+Fl_Xlib_Graphics_Driver::~Fl_Xlib_Graphics_Driver() {
+ if (p) free(p);
+#if USE_PANGO
+ pango_font_description_free(pfd_);
+#endif
+}
+
+
void Fl_Xlib_Graphics_Driver::gc(void *value) {
gc_ = (GC)value;
fl_gc = gc_;