[Top][All Lists]

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

Re: Not predefined Extended Latin character needed, interesting solution

From: Deri
Subject: Re: Not predefined Extended Latin character needed, interesting solution found
Date: Wed, 19 May 2021 21:25:21 +0100

On Wednesday, 19 May 2021 07:41:39 BST G. Branden Robinson wrote:
> This does seem to reveal the underlying problem; either the Times roman
> equivalent font on my system doesn't have a combining macron glyph
> U+0304 or groff doesn't know about it because afmtodit(1) didn't find
> out or didn't communicate that information in the TR font file it
> generated.  I tried to get a precomposed "a with macron above" by going
> for its Unicode code point directly in line 6.  That was a Hail Mary
> pass because, as I understand it:
> (A) A PostScript font isn't guaranteed to have its glyphs arranged in
>     Unicode code point order, and historically they in fact weren't.
> (B) Line 4 is the right way to ask for that code point; our "afmtodit
>     tables" force that to be decomposed to the form in line 5
>     automatically, so for -Tps and -Tpdf lines 4 and 5 wind up being
>     transformed to the same thing.  I think.  I haven't actually checked
>     device-independent output for this yet.
> Most concerning is that lines 4 and 5 render no glyph and also produce
> no warning.  We're not on the terminal; grops(1) and gropdf(1) should be
> given accurate font coverage information for the fonts they're using.

Hi Branden and fellow groffers,

Perhaps this is the point to have a discussion about the 35 fonts in the ps/pdf 
output generated 
by groff. This is all purely my understanding of the situation based on no 
research, rather 
osmosis and assumptions!

When Adobe developed the postscript language and the type 1 font format, their 
income came 
from licensing postscript interpreters to printer manufacturers. In order to be 
called a postscript 
printer it needed to support the 35 base fonts, either baked in Roms or as an 
attached disk, or as 
a file download by the print driver. Adobe also specified a glyph list (the 
AGL) which each font 
had to support. This list had just 256 glyph names.

When grops is generating a document which purely contains only these base fonts 
it does not 
need to download any font to the printer because all the font details are 
already "known" by the 
printer. This is why there are few type 1 fonts in the devps directory, and the 
fonts are not 
mentioned in the download file, also  why only 256 glyphs are available.

When developing gropdf I aimed to make it compatible with grops. A lot of 
debugging was 
overlaying two documents, ps and pdf, one in black and one in red, then turn 
down the 
transparency and look for telltale red pixels! So I used copies of the groff 
fonts in devps in 
devpdf.This means that for the base35 fonts it is also restricted to the 256 
glyphs. There is a 
difference though, the base fonts (i.e. the fonts every pdf viewer must know) 
are slightly 
different, so when some of the 35 fonts are used the gropdf has to include a 
copy of the font as 
part of document, this is why they are included in the download file, in case 
they are needed. 
Since I needed to "find" the 35 fonts, and realising those fonts often contains 
more than the 256 
glyphs on the AGL, I decided to add the concept of a foundry, so you could have 
named fonts, and have separate groff font files which use all the glyphs in the 
font, rather than 
limit to 256. I was hoping groff would get an extension where you could pass a 
foundry flag to 
groff ("-yU") which would mean that when groff read .ft TR it would actually 
use U-TR. A similar 
extension could be done for grops where use of a U- font would trigger the 
fonts to be 
downloaded. The intention was that if you specified the U foundry for either ps 
or pdf, you would 
then have access to the extended list of glyphs in the URW fonts which are 
likely already 
available on your system.

So, this leads to the question, should gropdf not follow grops in only making 
256 glyphs 
available in the standard fonts, or instead install the U- fonts as the 
standard fonts, i.e. drop the 
foundry distinction but have the full set of glyphs available? There are 
several pros and cons 
and it would make gropdf's decision whether to embed the font a little more 
complex (U- fonts 
are always downloaded).

There are plenty of people with far more knowledge about these things than I so 
comment on whether I have this correctly, and what would be best for our users.



reply via email to

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