# HG changeset patch # User Pantxo Diribarne # Date 1506087946 -7200 # Node ID 71a449b29cc7f5e4f99c6b99ba32248859d50874 # Parent 1457c018b6836985225406b4aeea72efa7292675 Save/Restore state of postscript program when dumping text (bug #48567) * gl2ps-print.cc (gl2ps_renderer::strlist_to_ps): use gsave/grestore around raw post script strings to not mess the current state of the program diff -r 1457c018b683 -r 71a449b29cc7 libinterp/corefcn/gl2ps-print.cc --- a/libinterp/corefcn/gl2ps-print.cc Thu Sep 21 22:51:54 2017 -0700 +++ b/libinterp/corefcn/gl2ps-print.cc Fri Sep 22 15:45:46 2017 +0200 @@ -791,6 +791,8 @@ Matrix prev_color (1, 3, -1); std::ostringstream ss; + ss << "gsave\n"; + for (const auto& txtobj : lst) { // Color @@ -832,7 +834,7 @@ << " /" << fontname << " SRX\n"; } - ss << "\n"; + ss << "grestore\n"; return ss.str (); }