bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Greek letters not slanted in -Tps eqn output


From: joerg van den hoff
Subject: Re: Greek letters not slanted in -Tps eqn output
Date: Mon, 8 Aug 2022 21:32:24 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0



On 08.08.22 18:49, Deri wrote:
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.

yes. and I profited from that :).


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.

thank you for this explanation. I think I nearly get it now regarding font selection. but regarding font metrics: my rudimentary understanding was/is that each glyph essentially gets assigned a rectangle ("bounding box" of the glyph) and that troff just arranges those boxes next to each other without gap or overlap, usually? probably there are finer points to this (microtypograph, gaps between or overlap of those rectangles etc) but mostly each glyph just occupies such a rectangle, no? if that were correct, then I still do not understand how the 1/2 fraction in the example could end up to look like

   1
 -
   2

i.e. the fraction bar is shifted relative to the digits. I would have expected that the whole fraction just appears either too close to or too far away from the preceding greek letters
if the wrong symbol font is found/used and a not-matching metric is used?

and actually I do not even understand, _why_ a not-matching metric should be used at all rather than the one of the actually (if erroneously) used font?

just wondering. no longer really relevant since problem solved :).

best,
joerg





Cheers

Deri

2.
what is the root cause of the misalignment of further equation elements
following the greek letters (in my example the 1/2 fraction where the
fraction bar is totally mispositioned relative to the digits (or those
relative to the fraction bar...))? if SS is not found and S used instead? I
would have thought this only could result in non-slanted greek letters but
not in wrong metric or whatever?

best,

joerg








reply via email to

[Prev in Thread] Current Thread [Next in Thread]