diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 9d2b85f26..58ea0062a 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -51,6 +51,7 @@ FL_EXPORT extern Fl_Graphics_Driver *fl_graphics_driver; typedef void (*Fl_Draw_Image_Cb)(void* data,int x,int y,int w,uchar* buf); struct Fl_Fontdesc; +typedef struct _PangoFontDescription PangoFontDescription; #define FL_REGION_STACK_SIZE 10 #define FL_MATRIX_STACK_SIZE 32 @@ -370,6 +371,7 @@ public: virtual void overlay_rect(int x, int y, int w , int h); virtual float override_scale(); virtual void restore_scale(float); + virtual PangoFontDescription* pango_font_description(Fl_Font fnum) { return NULL; } }; #ifndef FL_DOXYGEN diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H index bbcb4144a..a0ded9b30 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H @@ -46,7 +46,6 @@ public: int pages_; cairo_t *cr() { return cairo_; } PangoLayout *pango_layout() {return pango_layout_;}; - virtual PangoFontDescription* pango_font_description(Fl_Font fnum) { return NULL; } void check_status(void); diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index c041923d2..470f6df83 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -32,7 +32,6 @@ #include // for M_PI #include #include -#include "../Xlib/Fl_Xlib_Graphics_Driver.H" #endif const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file"; @@ -1503,7 +1502,7 @@ int Fl_PostScript_Graphics_Driver::start_eps(int width, int height) { } PangoFontDescription* Fl_PostScript_Graphics_Driver::pango_font_description(Fl_Font fnum) { - return Fl_Xlib_Graphics_Driver::pango_font_description(fnum); + return Fl_Graphics_Driver::default_driver().pango_font_description(fnum); } #endif // USE_PANGO diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H index e4a35306b..bae7640be 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H @@ -85,7 +85,7 @@ protected: static PangoFontMap *pfmap_; static PangoLayout *playout_; public: - static PangoFontDescription* pango_font_description(Fl_Font fnum) { return pfd_array[fnum]; } + virtual PangoFontDescription* pango_font_description(Fl_Font fnum) { return pfd_array[fnum]; } private: static PangoFontDescription **pfd_array; // one array element for each Fl_Font static int pfd_array_length;