Closed arcfide closed 8 years ago
Incidentally I am using this very font in all my xterm and putty windows :)
is this font known to Ghostscript? Usually Ghostscript uses its own font directory and there is a Fontmap file.
I get the same error message, even after adding the font to ghostscript's Fontmap. It does not look like a heirloom-doctools problem, but rather like a ghostscript issue. Does anyone else has an idea?
I found an issue with a similiar error report in Ghostscript, but the ghostscript maintainers complained that the issue wasn't with Ghostscript, but with the program that generated the code.
http://ghostscript.com/pipermail/gs-bugs/2011-May/019599.html
Furthermore, I can confirm that it doesn't matter whether Ghostsript has the font in the Fontmap, because I took the FreeMono otf font and I was able to use that without problems, even without it being in the Fontmap.
I can also confirm that I've just tested this with another TTF font derived from the FreeMono otf font that works just fine. However, both the Apl385 and Apl333 fonts don't work. I have also tried it with the SImPL_medium_APL TTF font and that works fine. It is only the Apl385 and Apl333 fonts that don't seem to be working.
Of course it works with other ttf/otf fonts. I have no idea what the problem is with the Apl fonts. I'll ask the groff list.
The font given in the link above is invalid. It contains a glyph named "Ano
" – note the trailing space in the glyph name, which is not allowed. I guess this makes heirloom output wrong code which GhostScript doesn't like.
Thank you very much for this information!
(So maybe a kludge could be to ignore invalid invalid glyph names. I'll have a look...)
I can confirm that this was indeed the problem. Actually, there are two glyphs in Apl385.ttf
which cause the problem, Ano
and dot product
. By removing the space from each of these using fontforge, I was able to get things to render just fine, and Ghostscript and Heirloom doctools troff now handle them fine. I'm going to throw this up the chain on the font developer's for this font.
Also, I'm tagging @mkromberg and @jayfoad about this, in case they can see it.
The following sed(1) script removes the broken definition of "dot product":
/dot product 732 def/d
s/\/dot product//
so the following pipeline should be producing the desired effect:
cat test.ms | refer -e -sAD -p biblio.db | tbl | troff -ms | dpost | sed -e '/dot product 732 def/d;s/\/dot product//' | ps2pdf
Actually I came to conclusion that dpost(1) should have been more careful when creating font definitions in PostScript.
OTF specification mentions only "PostScript glyph names" but it does not require them to be containing specific characters. Type 42 format spec says that the /CharStrings
dictionary keys and values can be generated by the PostScript language, so it is okay to use PostScript code to create a non-standard key name.
Thanks for the quick response on this issue.
I am attempting to use the following font:
http://dyalog.com/uploads/files/download.php?file=fonts_and_keyboards/Apl385.ttf
It fails during ghostscript interpretation with the following error:
I used the following test document:
This is on a Slackware-current system running the latest checkout from git.