I use preview-latex with Emacs and Ghostscript produces errors when interpreting some preview images, these are the ones that include an Optima clone (embedded). when called with gswin32c it is displayed properly but error messages about illegal functions RD and ND are given. Acroread on the other hand has no problems.
Created attachment 1875 [details] Testfile with embedded Optima clone and producing errors
The actual messages: ------------ **** Embedded font uses undefined procedure(s): RD 112 times, ND 8 times, **** This file had errors that were repaired or ignored. **** The file was produced by: **** >>>> MiKTeX pdfTeX-1.21a <<<< **** Please notify the author of the software that produced this **** file that it does not conform to Adobe's published PDF **** specification. -------------
The font file is mostly correct and the Ghostscript warning is false. The font defines /RD and /ND in userdict but Ghostscript provides the replacement procedures on a higher level in the dictionary stack. Probably, we need to re-arrange dictionary stack and define the replacement procedures below userdict.
What does mostly correct mean?
I guess "almost correct".
Created attachment 1894 [details] patch
Thank you very much, up to now no problems occured on my system...I will report if anything is broken by the patch.
Christian, thank you for using and testing Ghostscript. The fix has not been reviewed nor committed to the Ghostscript code base. So it's too early to close the bug. Besides, WORK resolution is reserved for the cases that require no changes in the Ghostscript code. When the patch is accepted, the bug will be FIXED.
Ok, but despite of that I will have a watchout for any sideeffects of the changes...thank you for this great software.
Please commit the patch.
The patch is committed to the trunk, rev. 6445 Move back-up CharString construction procedures (RD, ND, ...) to a special dictionary and put it below userdict to avoid warnings when the font defines them in userdict. Some broken fonts forget to define CharString construction procedures because non-PostScript font rasterizers don't detect this error. Ghostscript has a back-up definitions of the procedures that do their job and issue a warning. Other correct but old-fashioned fonts define CharString construction procedures in userdict. We had the back-up procedures defined above userdict, where they preempted the userdict definitions and issued a bogus warning. This patch moves the definitions below userdict.
*** Bug 689314 has been marked as a duplicate of this bug. ***