From: Peter W. <pet...@nt...> - 2015-11-26 14:24:24
|
I am using plplot5.11.1 under Windows 7. There seems to be an inconsistency between the plots using wingcc (the Win32 GCC device) and PostScript. The libaries were build using cmake and MinGW. I plot with plptex and pllab. Under wingcc: "#(855)" correctly appears as an arrow head, "#(2243)" appears as the symbol "less than or equal to" . Under Postscript nothing appears at all for both symbols. -- Peter Williams pet...@nt... |
From: Arjen M. <Arj...@de...> - 2015-11-26 14:27:58
|
Hi Peter, As far as I can tell, PostScript does not do non-ASCII characters at all - it is simply not part of PostScript (instead of being a problem in PLplot). I suggest you use a more modern output format instead, like PDF. Regards, Arjen > -----Original Message----- > From: Peter Williams [mailto:pet...@nt...] > Sent: Thursday, November 26, 2015 3:24 PM > To: plp...@li... > Subject: [Plplot-devel] Font problems > > I am using plplot5.11.1 under Windows 7. There seems to be an inconsistency > between the plots using wingcc (the Win32 GCC device) and PostScript. The > libaries were build using cmake and MinGW. I plot with plptex and pllab. > > Under wingcc: "#(855)" correctly appears as an arrow head, "#(2243)" > appears as the symbol "less than or equal to" . > Under Postscript nothing appears at all for both symbols. > > -- > Peter Williams > pet...@nt... > > > ------------------------------------------------------------------------------ > Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing > mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |
From: Alan W. I. <ir...@be...> - 2015-11-26 18:21:25
Attachments:
snapshot1.png
snapshot2.png
|
On 2015-11-26 14:24-0000 Peter Williams wrote: > I am using plplot5.11.1 under Windows 7. There seems to be an > inconsistency between the plots using wingcc (the Win32 GCC device) and > PostScript. The libaries were build using cmake and MinGW. I plot with > plptex and pllab. > > Under wingcc: "#(855)" correctly appears as an arrow head, "#(2243)" > appears as the symbol "less than or equal to" . > Under Postscript nothing appears at all for both symbols. Hi Peter: Please run the following commands using the -DBUILD_TEST=ON cmake option. make ps #Create both -dev ps and -dev psc make x07c #Build the 7th standard C example examples/c/x07c -dev psc -o test.psc When you view those test.psc PostScript results are the 855 and 2243 symbols missing from pages 9 and 13 of the results? On Linux those symbols are rendered well (see the two attached screenshots). So if your Windows results do not look like the Linux ones, then I think you need to install the 35 fonts which constitute the standard set of PostScript fonts. I don't have any direct Cygwin experience, but for what it is worth, these fonts are packaged with the package name ghostscript-fonts-std-8.11-1 on Cygwin (at least that was the result when I searched the Cygwin package index for one of the 35 standard font file names). I don't know how this standard set of fonts should be installed for non-Cygwin Windows platforms (which is the platform I assume you are using). It is these standard fonts that the ps device driver uses for rendering text. If you are getting any text rendered at all from the above result then it appears -dev psc is finding at least some of the standard set of 35 PostScript fonts, but the problem may be that you have not installed all such fonts on your non-Cygwin Windows platform. @Arjen: I have noticed you already responded once, but could you do so again with your own results from the above test for both the Cygwin and non-Cygwin cases? If you can replicate the Linux results for both your Cygwin and non-Cygwin Windows platforms then I hope you can give some advice to Peter about how you install the standard set of PostScript fonts on that latter platform. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Arjen M. <Arj...@de...> - 2015-11-27 08:04:19
|
Hi Alan, Peter, I have ran example x07c under bare Windows - there was no problem with the PostScript output. Both symbols appear in the PostScript file, just as in the graphical window. The symbols appear to be drawn though as Hershey symbols, the arrow head is a triangle made opaque with a couple of lines, not a filled triangle. I have not studied the actual rendering in any deep way (a trifle involved for the morning of a busy day), but I suspect that this might be the underlying cause. Regards, Arjen > -----Original Message----- > From: Alan W. Irwin [mailto:ir...@be...] > Sent: Thursday, November 26, 2015 7:21 PM > To: Peter Williams; Arjen Markus > Cc: PLplot development list > Subject: Re: [Plplot-devel] Font problems > > On 2015-11-26 14:24-0000 Peter Williams wrote: > > > I am using plplot5.11.1 under Windows 7. There seems to be an > > inconsistency between the plots using wingcc (the Win32 GCC device) > > and PostScript. The libaries were build using cmake and MinGW. I plot > > with plptex and pllab. > > > > Under wingcc: "#(855)" correctly appears as an arrow head, "#(2243)" > > appears as the symbol "less than or equal to" . > > Under Postscript nothing appears at all for both symbols. > > Hi Peter: > > Please run the following commands using the -DBUILD_TEST=ON cmake option. > > make ps #Create both -dev ps and -dev psc make x07c #Build the 7th standard C > example examples/c/x07c -dev psc -o test.psc > > When you view those test.psc PostScript results are the 855 and 2243 symbols > missing from pages 9 and 13 of the results? > > On Linux those symbols are rendered well (see the two attached screenshots). So if > your Windows results do not look like the Linux ones, then I think you need to install > the 35 fonts which constitute the standard set of PostScript fonts. I don't have any > direct Cygwin experience, but for what it is worth, these fonts are packaged with the > package name ghostscript-fonts-std-8.11-1 on Cygwin (at least that was the result > when I searched the Cygwin package index for one of the > 35 standard font file names). I don't know how this standard set of fonts should be > installed for non-Cygwin Windows platforms (which is the platform I assume you are > using). It is these standard fonts that the ps device driver uses for rendering text. If > you are getting any text rendered at all from the above result then it appears -dev > psc is finding at least some of the standard set of 35 PostScript fonts, but the > problem may be that you have not installed all such fonts on your non-Cygwin > Windows platform. > > @Arjen: I have noticed you already responded once, but could you do so again with > your own results from the above test for both the Cygwin and non-Cygwin cases? If > you can replicate the Linux results for both your Cygwin and non-Cygwin Windows > platforms then I hope you can give some advice to Peter about how you install the > standard set of PostScript fonts on that latter platform. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state implementation for > stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); > PLplot scientific plotting software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure > Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |
From: Peter W. <pet...@nt...> - 2015-11-27 16:57:32
|
Hi Alan & Arjen Thanks for your attention. Hope I am posting this correctly. One of the first things I did when I built Plplot5.11.1 was to run the c code examples. Example x07c.c runs fine and displays the character #(855) – an arrow head in a Postscript file. All very jolly! So, the fonts must be built into the library. My program shows nothing. But maybe the comparison is false because I plot using plptex while x07c.c uses a different method, which I confess I am not clear about. It does print some characters correctly e.g. #(766) - the infinity symbol. I have been using Plplot for a long time starting with an ARM Acorn Archimedes. I built Plplot5.00 back in the 90's using a collection of .bat files. I still have it and it plots #(855) fine. I thought it was time to upgrade... I build using CMAKE 3.4.0-rc2 in its GUI form. It didn't seem to want to left me build a pdf device. Maybe I am not using it correctly. A simplified version of my program is: /* FontTest */ #include <math.h> #include <plplot.h> int main() { int i; PLFLT x,y,dx,dy,theta,dTheta,xMin,xMax,yMin,yMax; xMin = -4.0; xMax = 1.0; yMin = -2.0; yMax = 2.0; /* Set up viewport and window, but do not draw box */ plinit(); plenv( xMin, xMax, yMin, yMax, 0, 0 ); plfontld(1);plfont(1); x = -2.0; y = 2.0*exp(-x*x/4.0); dy = -x*exp(-x*x/4.0); /* Find arrow slope */ plptex(x, y,1.0,dy,0.5,"#(855)"); /* C2 Arrow */ plptex(x,-y,dx,dy,0.5,"#(855)"); /* C1 Arrow */ plptex(x,0,-1.0,0.0,0.5,"#(855)"); /* Gamma Arrow */ plend(); return 1; } Best Wishes, Peter |
From: Jim D. <ji...@di...> - 2015-11-27 17:38:43
|
The PS driver has support for unicode, though it relies on the fonts installed in the postscript device that is rendering the file. There is no reliable method for plplot to know which fonts are available to the postscript device. When the PLplot ps driver was converted to unicode, I think the default use of Hershey fonts for symbols was ended. The behavior of postscript files can be unexpected under Windows. Depending on whether you are viewing (third-party viewer or Windows provided) or printing the files, there could be differences in the output due to available fonts. There is an option that will enable Hershey symbols in the PS driver, so you can set that if you do not have the fonts available. > On Nov 27, 2015, at 11:57 AM, Peter Williams <pet...@nt...> wrote: > > Hi Alan & Arjen > > Thanks for your attention. Hope I am posting this correctly. One of the > first things I did when I built Plplot5.11.1 was to run the c code > examples. Example x07c.c runs fine and displays the character #(855) – > an arrow head in a Postscript file. All very jolly! So, the fonts must > be built into the library. My program shows nothing. But maybe the > comparison is false because I plot using plptex while x07c.c uses a > different method, which I confess I am not clear about. It does print > some characters correctly e.g. #(766) - the infinity symbol. > > I have been using Plplot for a long time starting with an ARM Acorn > Archimedes. I built Plplot5.00 back in the 90's using a collection of > .bat files. I still have it and it plots #(855) fine. I thought it was > time to upgrade... I build using CMAKE 3.4.0-rc2 in its GUI form. It > didn't seem to want to left me build a pdf device. Maybe I am not using > it correctly. > > A simplified version of my program is: > > /* > FontTest > */ > #include <math.h> > #include <plplot.h> > > int main() > { > int i; > PLFLT x,y,dx,dy,theta,dTheta,xMin,xMax,yMin,yMax; > > xMin = -4.0; xMax = 1.0; yMin = -2.0; yMax = 2.0; > > /* Set up viewport and window, but do not draw box */ > > plinit(); > plenv( xMin, xMax, yMin, yMax, 0, 0 ); > plfontld(1);plfont(1); > > x = -2.0; y = 2.0*exp(-x*x/4.0); dy = -x*exp(-x*x/4.0); /* Find > arrow slope */ > plptex(x, y,1.0,dy,0.5,"#(855)"); /* C2 Arrow */ > plptex(x,-y,dx,dy,0.5,"#(855)"); /* C1 Arrow */ > plptex(x,0,-1.0,0.0,0.5,"#(855)"); /* Gamma Arrow */ > > plend(); > return 1; > } > > Best Wishes, Peter > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel |
From: Greg J. <gv...@gm...> - 2015-11-27 19:12:12
|
> It didn't seem to want to left me build a pdf device. To get pdf device you will need the libharu library https://github.com/libharu/libharu/archive/RELEASE_2_3_0.zip which should build without issue. On Fri, Nov 27, 2015 at 8:57 AM, Peter Williams <pet...@nt...> wrote: > Hi Alan & Arjen > > Thanks for your attention. Hope I am posting this correctly. One of the > first things I did when I built Plplot5.11.1 was to run the c code > examples. Example x07c.c runs fine and displays the character #(855) – > an arrow head in a Postscript file. All very jolly! So, the fonts must > be built into the library. My program shows nothing. But maybe the > comparison is false because I plot using plptex while x07c.c uses a > different method, which I confess I am not clear about. It does print > some characters correctly e.g. #(766) - the infinity symbol. > > I have been using Plplot for a long time starting with an ARM Acorn > Archimedes. I built Plplot5.00 back in the 90's using a collection of > .bat files. I still have it and it plots #(855) fine. I thought it was > time to upgrade... I build using CMAKE 3.4.0-rc2 in its GUI form. It > didn't seem to want to left me build a pdf device. Maybe I am not using > it correctly. > > A simplified version of my program is: > > /* > FontTest > */ > #include <math.h> > #include <plplot.h> > > int main() > { > int i; > PLFLT x,y,dx,dy,theta,dTheta,xMin,xMax,yMin,yMax; > > xMin = -4.0; xMax = 1.0; yMin = -2.0; yMax = 2.0; > > /* Set up viewport and window, but do not draw box */ > > plinit(); > plenv( xMin, xMax, yMin, yMax, 0, 0 ); > plfontld(1);plfont(1); > > x = -2.0; y = 2.0*exp(-x*x/4.0); dy = -x*exp(-x*x/4.0); /* Find > arrow slope */ > plptex(x, y,1.0,dy,0.5,"#(855)"); /* C2 Arrow */ > plptex(x,-y,dx,dy,0.5,"#(855)"); /* C1 Arrow */ > plptex(x,0,-1.0,0.0,0.5,"#(855)"); /* Gamma Arrow */ > > plend(); > return 1; > } > > Best Wishes, Peter > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel |
From: Alan W. I. <ir...@be...> - 2015-11-27 20:00:42
|
On 2015-11-27 16:57-0000 Peter Williams wrote: > Hi Alan & Arjen > > Thanks for your attention. Hope I am posting this correctly. One of the first > things I did when I built Plplot5.11.1 was to run the c code examples. > Example x07c.c runs fine and displays the character #(855) – an arrow head > in a Postscript file. All very jolly! So, the fonts must be built into the > library. My program shows nothing. But maybe the comparison is false because > I plot using plptex while x07c.c uses a different method, which I confess I > am not clear about. It does print some characters correctly e.g. #(766) - > the infinity symbol. > > I have been using Plplot for a long time starting with an ARM Acorn > Archimedes. I built Plplot5.00 back in the 90's using a collection of .bat > files. I still have it and it plots #(855) fine. I thought it was time to > upgrade... I build using CMAKE 3.4.0-rc2 in its GUI form. It didn't seem to > want to left me build a pdf device. Maybe I am not using it correctly. > > A simplified version of my program is: > > /* > FontTest > */ > #include <math.h> > #include <plplot.h> > > int main() > { > int i; > PLFLT x,y,dx,dy,theta,dTheta,xMin,xMax,yMin,yMax; > > xMin = -4.0; xMax = 1.0; yMin = -2.0; yMax = 2.0; > > /* Set up viewport and window, but do not draw box */ > > " plinit(); > plenv( xMin, xMax, yMin, yMax, 0, 0 ); > plfontld(1);plfont(1); > > x = -2.0; y = 2.0*exp(-x*x/4.0); dy = -x*exp(-x*x/4.0); /* Find arrow > slope */ > plptex(x, y,1.0,dy,0.5,"#(855)"); /* C2 Arrow */ > plptex(x,-y,dx,dy,0.5,"#(855)"); /* C1 Arrow */ > plptex(x,0,-1.0,0.0,0.5,"#(855)"); /* Gamma Arrow */ > > plend(); > return 1; > } > > Best Wishes, Peter > Hi Peter: Thanks very much for this more detailed report. Including a simple test like you did above is always a good motivator for us. :-) As far as I can tell there is nothing wrong with your above test programme (aside from uninitialized dx which I fixed by setting that variable to 0.). With that fix in place, I have confirmed the issue (arrow not rendered) on Linux (Debian Jessie) with the psc device. After the dx fix, valgrind shows an absolutely clean result so the bad rendering issue is unlikely to be caused by memory management problems. To investigate further I modified examples/c/x10c.c (which is our simplest example that uses plptex) as follows: --- a/examples/c/x10c.c +++ b/examples/c/x10c.c @@ -28,7 +28,7 @@ main( int argc, const char *argv[] ) plsvpa( 50.0, 150.0, 50.0, 100.0 ); plwind( 0.0, 1.0, 0.0, 1.0 ); plbox( "bc", 0.0, 0, "bc", 0.0, 0 ); - plptex( 0.5, 0.5, 1.0, 0.0, 0.5, "BOX at (50,150,50,100)" ); + plptex( 0.5, 0.5, 1.0, 0.0, 0.5, "Hershey code #(855)" ); plend(); exit( 0 ); } The advantage of working with slightly modified standard examples like this is our build system makes them extremely convenient to build and run. With the above change to standard example 10, I again confirmed the issue (arrow not rendered) for -dev psc and -dev ps, but the following devices did properly render the arrow: xwin, tk, xcairo, wxwidgets, qtwidget, and even psttfc (which has similarities to -dev psc). For the -dev svg case (which is another device without external library prerequisites which is convenient for you to also try on Windows) the arrow was rendered as a question mark. The conclusion is there is a specific bug for the ps device driver for PostScript fonts, and also a specific bug for the svg device (which is probably not related). I will look into both of those. Meanwhile for the psc (or ps) device there is a driver option which allows you to replace the PostScript fonts with Hershey fonts. If you have command-line parsing in place (which your above example does not, but look at any of the example/c/x??c.c files to see how to implement that with a change to the main arguments and inserting a call to plparseopts), then use the -drvopt text=0 command-line option to try the Hershey font possibility. That works fine here (arrow rendered) although the results are generally not as pretty as those rendered with PostScript fonts. Thanks again for reporting this bug. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |