From 461750c38e1835e4a730e0f83a48fe090f41feae Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 21 Dec 2016 15:05:02 +0000 Subject: 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 --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx') 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_; -- cgit v1.2.3