groff
[Top][All Lists]
Advanced

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

Re: [groff] Macron characters in pdf files


From: Deri
Subject: Re: [groff] Macron characters in pdf files
Date: Tue, 05 Jun 2018 20:00:53 +0100

On Tuesday, 5 June 2018 16:37:15 BST Peter Schaffter wrote:
> Hi, Deri.
> 
> > The results, i.e. failure, are identical for both gropdf and grops.
> 
> Hmm...  Processing your file, macron.trf, with -Tps and -Tpdf
> produces results different from yours, namely
> 
> With .ft TR:
> 
>   groff -Tps -k macron.trf > macron.ps
>     -> output correct, macrons appearing as expected
> 
>   groff -Tpd -k macron.trf > macron.pdf
>     -> "can't find special character"
> 
> So on my end, the failure only affects gropdf, not grops, as the
> original poster stated.  Attached are the results of
> 
>   groff -Tps -k -Z macron.trf 2>&1 > macron.ps
> 
> and
> 
>   groff -Tpdf -k -Z macron.trf 2>&1 > macron.pdf
> 
> when processed with .ft TR.

If you diff the two files you provided you will see that the ps version has 
some extra lines of the form:-

 tA
 wh2500
 t=
+wh2500
+Cu0041_0304
+h7220
 n12000 0

The extra line "Cu0041_0304" contains the glyph name of the capital A macron. 
This is not in the pdf version of the file because of the "can't find special 
character" warnings you observed. If you execute:-

gropdf -yU macron.ps | okular -

I.E. Running gropdf with the grops intermediate output and specifying the U 
foundry which we know contains that glyph, you should get the desired output. 
This means that your TR font in devps is not the standard one delivered with 
groff, it contains the extended character set which are contained in the URW 
fonts. If I run grops on your macron.ps I receive messages like:-

grops:macron.ps (macron.trf):27: font `TR' does not contain special character 
`u0061_0304'

If I copy the devpdf U-TR file to devps as TR and change the internalname to 
Times-Roman, grops can then produce the correct output. 

This does open the question of whether the default grops fonts (and by 
association gropdf) need updating to include the extended character sets which 
are now in both the ghostscript and URW fonts. Further if I send the produced 
file direct to port 9100 with netcat, so no cups filters involved, to my 
postscript printer, it comes out Ok, showing that the extended characters are 
in the Times-Roman font embedded in my printer as well. Whether this is a good 
or safe thing to do I am not sure, I had assumed the postscript standard had 
only mandated the first 256 glyphs which was why the grops font files only 
contained those definitions, but my printer has the extended character set 
because the postscript file I printed directly did not have an embedded font 
just the normal encoding and sub-encoding for the characters above 255. I hope 
list members who know a lot more than me will put me right!

> > But it may be all he needs is .FAMILY U-T or similar, to make it
> > work, depends on whether his gropdf includes the U foundry.
> 
> I'm passing the advice along.  Thanks.
> 
> Cheers.

Cheers

Deri






reply via email to

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