From 63e987edd0e54c161502b8da2f9ea83db9a730ea Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Fri, 5 Apr 2013 10:55:46 +0200 Subject: [PATCH] Removed the default generation of phantom text by the postscript plot driver. It crashes Adobe's own implementation of postscript! --- include/plot_common.h | 13 ++++++++++--- pcbnew/pcb_plot_params.cpp | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/plot_common.h b/include/plot_common.h index fce08c366b..dfe2588349 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -37,6 +37,7 @@ enum PlotFormat { * 2) only use native postscript fonts * 3) use the internal vector font and add 'phantom' text to aid * searching + * 4) keep the default for the plot driver * * This is recognized by the DXF driver too, where NATIVE emits * TEXT entities instead of stroking the text @@ -44,7 +45,8 @@ enum PlotFormat { enum PlotTextMode { PLOTTEXTMODE_STROKE, PLOTTEXTMODE_NATIVE, - PLOTTEXTMODE_PHANTOM + PLOTTEXTMODE_PHANTOM, + PLOTTEXTMODE_DEFAULT }; @@ -439,7 +441,8 @@ public: */ virtual void SetTextMode( PlotTextMode mode ) { - m_textMode = mode; + if( mode != PLOTTEXTMODE_DEFAULT ) + m_textMode = mode; } virtual void SetDefaultLineWidth( int width ); @@ -514,6 +517,9 @@ class PS_PLOTTER : public PSLIKE_PLOTTER public: PS_PLOTTER() { + // The phantom plot in postscript is an hack and reportedly + // crashes Adobe's own postscript interpreter! + m_textMode = PLOTTEXTMODE_STROKE; } static wxString GetDefaultFileExtension() @@ -838,7 +844,8 @@ public: */ virtual void SetTextMode( PlotTextMode mode ) { - textAsLines = ( mode != PLOTTEXTMODE_NATIVE ); + if( mode != PLOTTEXTMODE_DEFAULT ) + textAsLines = ( mode != PLOTTEXTMODE_NATIVE ); } virtual bool StartPlot(); diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index 5d0fd927dc..b3ea9c527c 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -111,7 +111,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() m_color = BLACK; m_referenceColor = BLACK; m_valueColor = BLACK; - m_textMode = PLOTTEXTMODE_PHANTOM; + m_textMode = PLOTTEXTMODE_DEFAULT; // This parameter controls if the NPTH pads will be plotted or not // it is are "local" parameters