Add Pango version check for Fl_PostScript_Graphics_Driver
This commit is contained in:
parent
cd60ea17b0
commit
237c0c1393
@ -1157,7 +1157,7 @@ void Fl_Cairo_Graphics_Driver::draw(const char* str, int n, float x, float y) {
|
||||
// The -0.5 below makes underscores visible in Fl_Text_Display at scale = 1
|
||||
cairo_translate(cairo_, x, y - height() + descent() -0.5);
|
||||
pango_layout_set_text(pango_layout_, str, n);
|
||||
pango_cairo_show_layout(cairo_, pango_layout_);
|
||||
pango_cairo_show_layout(cairo_, pango_layout_); // 1.1O
|
||||
cairo_restore(cairo_);
|
||||
surface_needs_commit();
|
||||
}
|
||||
|
@ -32,6 +32,9 @@
|
||||
#include <FL/math.h> // for M_PI
|
||||
#include <pango/pangocairo.h>
|
||||
#include <cairo/cairo-ps.h>
|
||||
# if ! PANGO_VERSION_CHECK(1,22,0)
|
||||
# error "Requires Pango 1.22 or higher"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
const char *Fl_PostScript_File_Device::file_chooser_title = "Select a .ps file";
|
||||
@ -1536,7 +1539,7 @@ void Fl_PostScript_Graphics_Driver::transformed_draw(const char* str, int n, dou
|
||||
cairo_translate(cairo_, x, y - height() + descent());
|
||||
s = (s/pwidth) * PANGO_SCALE;
|
||||
cairo_scale(cairo_, s, s);
|
||||
pango_cairo_show_layout(cairo_, pango_layout_);
|
||||
pango_cairo_show_layout(cairo_, pango_layout_); // 1.10
|
||||
}
|
||||
cairo_restore(cairo_);
|
||||
check_status();
|
||||
|
Loading…
Reference in New Issue
Block a user