From 8accc6e8409819316fa296642c1d23e5638fcb2d Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 28 Oct 2020 17:19:05 +0100 Subject: Pango ps (#148) Use cairo-PostScript to output PostScript when pango is available. This allows to draw in vectorial form any script. Before, only the Latin script could be drawn to PostScript in vectorial form. --- test/device.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/device.cxx b/test/device.cxx index 154bdb844..8b04e53d2 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -617,7 +617,12 @@ void copy(Fl_Widget *, void *data) { } if (!err) { p->begin_page(); - if (target->as_window()) p->print_window(target->as_window()); + if (target->as_window()) { + int w, h; + p->printable_rect(&w, &h); + p->origin(w/2, h/2); + p->print_window(target->as_window(), -target->w()/2, -target->h()/2); + } else p->print_widget(target); p->end_page(); p->end_job(); @@ -646,10 +651,8 @@ void copy(Fl_Widget *, void *data) { if (p.file()) { if (target->as_window()) p.draw_decorated_window(target->as_window()); else p.draw(target); - //p.close(); } } - fclose(eps); } } -- cgit v1.2.3