On Monday, 8 August 2022 15:49:43 BST joerg van den hoff wrote:
hi deri,
turns out I actually _have_ had the same problem (sort of, at least): I
recently installed additional fonts and like robert was not aware that it
is necessary to merge the default `download' file into the new one.
Hi Joerg,
Robert sent the source and the outputs it produced on his system, so it was
easier to diagnose the problem.
question 1: this is really a bit cumbersome (and prone to cause problems
with users not completely on top of the situation ;)). would it be
complicated (or wrong for some reason) for groff to recursively search
_all_ `download' instances on the font search path until a hit (or none) is
found? I really was simply taking that for granted: first look at custom
fonts and look for everything else in default location.
in any case, after including the default `download' into the new one (so far
having only listed my newly installed fonts) and, especially, SS, grops
indeed now produces correctly the slanted greek letters *and*, ultimately
more relevant, cures the strange misalignment problems I had noticed.
question 2: while I now understand, that groff, indeed did previously not
find SS (since it was specified only in the default place) and that this
was simply my fault, I still do _not_ understand the following:
1.
the resulting misformatted pdf lists the symbols-slanted font as the one
being used (although (a) the font had not been found and (b) definitely had
not been used since all greek letters appeared w/o slant). why? if the
fallback seemingly is to use S when SS is not found, why does the pdf file
still claim it uses SS?
In the postscript Symbol-Slanted is required as an "IncludeResource", this
means that whatever consumes the pdf must find the resource itself. When grops
does not find the font in its download file it is just marking it as something
the next stage will need to satisfy. This is "normal" behaviour, since all the
standard 35 fonts are also not mentioned in the download file so they are
treated the same way, notify the next stage to find the font.
What happens in the "next stage? In this case, ghostscript distilling to a
pdf. The Times-Roman and Symbol fonts are known to ghostscript, but Symbol-
Slanted is not. Rather than give up, it must query the system in some way
(possibly using fontconfig or something similar) and receives the name of a
font, which is probably Symbol. Since this is a custom font now, it embeds the
font it has found into the pdf. Since we do not know which font ghostscript
has actual chosen, we only know it contains the greek glyphs, the metrics of
the font could be different from what groff expected when it used the SS font.