# HG changeset patch # User Pantxo Diribarne # Date 1661790564 -7200 # Node ID df8bdaf1164b3d08f7503c525da5a0f03f1fc22f # Parent 84e8f0bf83f7f99e463ebdf799f304406aa2f93f print.m: Use -svgconvert by default (bug #62979) * NEW.8.md: Announce the change. * print.m: Reword the documentation. Document the new "-nosvgconvert" option. * __print_parse_opts__.m: Make svgconvert option true by default. Check for new "-nosvgconvert" option. diff -r 84e8f0bf83f7 -r df8bdaf1164b etc/NEWS.8.md --- a/etc/NEWS.8.md Tue Nov 15 09:36:55 2022 -0800 +++ b/etc/NEWS.8.md Mon Aug 29 18:29:24 2022 +0200 @@ -45,6 +45,11 @@ ### Graphics backend +- When printing, the option `-svgconvert` is now the default. If you want to +use the more limited EPS-based tool chain (the former default)—e.g., if +you encounter inaccurate image rendering—you can pass the `-nosvgconvert` +option to the `print` function. + - Additional properties have been added to the `figure` graphics object: * `"innerposition"` (equivalent to `"position"`) * `"windowstate"` (not yet implemented) diff -r 84e8f0bf83f7 -r df8bdaf1164b scripts/plot/util/print.m --- a/scripts/plot/util/print.m Tue Nov 15 09:36:55 2022 -0800 +++ b/scripts/plot/util/print.m Mon Aug 29 18:29:24 2022 +0200 @@ -127,9 +127,10 @@ ## JPEG) and @qcode{"painters"} for vector formats (e.g., PDF)@. These options ## are only supported for the "qt" graphics toolkit. ## -## @item -svgconvert -## When using the @option{-painters} renderer, this enables a different -## backend toolchain with enhanced characteristics: +## @item -svgconvert (default) +## @item -nosvgconvert +## When using the @option{-painters} renderer, this enables or disables the +## SVG based backend toolchain with enhanced characteristics: ## ## @table @asis ## @item Font handling: @@ -263,9 +264,8 @@ ## ## Use @code{pdfcrop} if you don't want the surrounding page. ## -## By default, PDF inherits the same limitations as PostScript. -## For an enhanced output with complete text support and basic transparency, -## use the @option{-svgconvert} option. +## Caution: with @option{-nosvgconvert} option, PDF inherits the same +## limitations as PostScript (limited set of fonts and lack of transparency). ## ## @item eps(2) ## @itemx epsc(2) @@ -273,7 +273,7 @@ ## ## The OpenGL-based graphics toolkits always generate PostScript level 3.0. ## They have limited support for text unless using the @option{-svgconvert} -## option. +## option (the default). ## Limitations include using only ASCII characters (e.g., no Greek letters) ## and support for just three base PostScript fonts: Helvetica (the default), ## Times, or Courier. Any other font will be replaced by Helvetica. diff -r 84e8f0bf83f7 -r df8bdaf1164b scripts/plot/util/private/__print_parse_opts__.m --- a/scripts/plot/util/private/__print_parse_opts__.m Tue Nov 15 09:36:55 2022 -0800 +++ b/scripts/plot/util/private/__print_parse_opts__.m Mon Aug 29 18:29:24 2022 +0200 @@ -69,7 +69,7 @@ arg_st.rgb_output = false; arg_st.send_to_printer = false; arg_st.special_flag = "textnormal"; - arg_st.svgconvert = false; + arg_st.svgconvert = true; arg_st.svgconvert_binary = __quote_path__ (__svgconv_binary__ ()); arg_st.tight = true; arg_st.use_color = 0; # 0=default, -1=mono, +1=color @@ -125,6 +125,8 @@ arg_st.tight = true; elseif (strcmp (arg, "-svgconvert")) arg_st.svgconvert = true; + elseif (strcmp (arg, "-nosvgconvert")) + arg_st.svgconvert = false; elseif (strcmp (arg, "-textspecial")) arg_st.special_flag = "textspecial"; elseif (strcmp (arg, "-fillpage")) @@ -236,11 +238,6 @@ arg_st.devopt); endif - ## By default, postprocess svg files using svgconvert. - if (strcmp (arg_st.devopt, "svg")) - arg_st.svgconvert = true; - endif - ## By default, use the "opengl" renderer for all raster outputs ## supported by "imwrite". fmts = imformats ();