Removed the default generation of phantom text by the postscript plot driver.

It crashes Adobe's own implementation of postscript!
This commit is contained in:
Lorenzo Marcantonio 2013-04-05 10:55:46 +02:00
parent 752e4a4a58
commit 63e987edd0
2 changed files with 11 additions and 4 deletions

View File

@ -37,6 +37,7 @@ enum PlotFormat {
* 2) only use native postscript fonts * 2) only use native postscript fonts
* 3) use the internal vector font and add 'phantom' text to aid * 3) use the internal vector font and add 'phantom' text to aid
* searching * searching
* 4) keep the default for the plot driver
* *
* This is recognized by the DXF driver too, where NATIVE emits * This is recognized by the DXF driver too, where NATIVE emits
* TEXT entities instead of stroking the text * TEXT entities instead of stroking the text
@ -44,7 +45,8 @@ enum PlotFormat {
enum PlotTextMode { enum PlotTextMode {
PLOTTEXTMODE_STROKE, PLOTTEXTMODE_STROKE,
PLOTTEXTMODE_NATIVE, PLOTTEXTMODE_NATIVE,
PLOTTEXTMODE_PHANTOM PLOTTEXTMODE_PHANTOM,
PLOTTEXTMODE_DEFAULT
}; };
@ -439,6 +441,7 @@ public:
*/ */
virtual void SetTextMode( PlotTextMode mode ) virtual void SetTextMode( PlotTextMode mode )
{ {
if( mode != PLOTTEXTMODE_DEFAULT )
m_textMode = mode; m_textMode = mode;
} }
@ -514,6 +517,9 @@ class PS_PLOTTER : public PSLIKE_PLOTTER
public: public:
PS_PLOTTER() 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() static wxString GetDefaultFileExtension()
@ -838,6 +844,7 @@ public:
*/ */
virtual void SetTextMode( PlotTextMode mode ) virtual void SetTextMode( PlotTextMode mode )
{ {
if( mode != PLOTTEXTMODE_DEFAULT )
textAsLines = ( mode != PLOTTEXTMODE_NATIVE ); textAsLines = ( mode != PLOTTEXTMODE_NATIVE );
} }

View File

@ -111,7 +111,7 @@ PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
m_color = BLACK; m_color = BLACK;
m_referenceColor = BLACK; m_referenceColor = BLACK;
m_valueColor = BLACK; m_valueColor = BLACK;
m_textMode = PLOTTEXTMODE_PHANTOM; m_textMode = PLOTTEXTMODE_DEFAULT;
// This parameter controls if the NPTH pads will be plotted or not // This parameter controls if the NPTH pads will be plotted or not
// it is are "local" parameters // it is are "local" parameters