Remove X11-specific code from platform-independent Fl_PostScript.cxx

This commit is contained in:
ManoloFLTK 2021-03-26 07:52:21 +01:00
parent 4951fd1801
commit 4657e988f7
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -32,7 +32,6 @@
#include <FL/math.h> // for M_PI
#include <pango/pangocairo.h>
#include <cairo/cairo-ps.h>
#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

View File

@ -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;