gdl icon indicating copy to clipboard operation
gdl copied to clipboard

Where are the ugly, but functional, postscript fonts ;)

Open dirteat opened this issue 2 years ago • 2 comments

Hi there, it seems the default postscript device output fonts have been changed from the "typical" ugly aliased one to something looking nice.

I have a problem with this for various reasons :)

  1. The new fonts are not fully functional, this piece of code does not display properly the Greek letter "epsilon". It looks like it is replaced by a white space (other Greek letters are correctly displayed, even though I did not test the whole alphabet).
set_plot,'ps'
fileout='test.eps'
device,filename=fileout,/color,bits=8
plot,[0,1],[0,1],ytitle='!7e!6!D1!N'
device,/close
end
  1. For matching historical figures, I would like to use the ugly font, on purpose. I've tried various things on the command line, but only the nice looking ones show up. Using:

gdl --no-use-wx

I still see this message:

  • Using WxWidgets as graphics library (windows and widgets)

Any help welcome, thanks!

This is gdl-1.0.1, but the same problem is present in gdl-1.0.0

dirteat avatar Apr 11 '22 14:04 dirteat

Hi @dirteat I can reproduce your error in GDL-1.0.0 Somewhere around 0.8 the default font for PostScript has been forced to nice PostScript fonts instead of ugly Hershey 'fonts'. It was expected (and checked, at the time) that plplot (that writes the postscript file behind the scenes) would know how to write greek etc letters. Apparently, this is no more the case (?). There are two solutions. The first would be to change line 110 in src/deviceps.hpp as follows: string what="text=0,color="+i2s(color); and recompile to get back the ugly fonts. The second is to install the current GDL version since it is more flexible with the fonts and uses hershey by default.

For the record, Hershey fonts are not ugly at all, it is just that plplot does not "pixelise" them correctly, at least with its basic drivers used in GDL.

GillesDuvert avatar Apr 12 '22 11:04 GillesDuvert

Although the problem is not corrected (plplot driver + postscript fonts) I believe the default hershey fonts with #1338 changes give more than acceptable results: image

GillesDuvert avatar Jul 10 '22 20:07 GillesDuvert

Yes, I forgot to update, but whatever fonts are now, they look as the historical ones (gdl-1.0.2)!

Big thanks!

dirteat avatar Sep 14 '23 11:09 dirteat