On Sunday, 9 March 2025 21:08:58 GMT Nikita Ivanov wrote:
> Hi Deri,
> 
> Thank you! Yes, this solution is much easier than having to install
> fonts manually. Some questions and random findings/thoughts:
> 
> It seems that it only works for PDF output, is there a similar simple
> solution for PostScript?

Hi Nikita,

Bjarni has suggested setting up links between devps and devpdf to extend the 
functionality to grops. This will probably work Ok if the resultant postscript 
is intended to be run through ghostscript, but there could be problems if it 
is sent directly to a postscript printer. The reason is because grops only 
embeds fonts in the postscript if there is an appropriate entry in its 
download file, otherwise the font is listed as a "needed resource" (rather 
than a "provided resource"). In order for a printer to be called a postscript 
printer it must have the 35 standard fonts available, but there is no 
guarantee those fonts will include the extra glyphs provided by URW.

> Also, it was not completely friction-less for me because I had to
> compile groff from source and add --with-urw-fonts-dir to ./configure
> command. I don't know if it is the case for other distributions as well,
> but on Arch Linux groff package does not include the URW fonts. I don't
> know if there is a good reason for it or it is some sort of mistake.

I don't have any input into how groff is packaged by various distributions. 
Distributions tend to use multiple packages to deliver groff, mine has:-

groff
groff-doc
groff-for-man
groff-perl
groff-x11

And all the pdf "stuff" is in groff-perl. When groff is compiled it looks for 
the URW fonts in multiple locations, if it finds the within ghostscript then 
groff should really be recompiled whenever ghostscript is updated since the 
position of the ghostscript fonts will change and the information in the 
gropdf download file becomes stale.

> I think the fact that using URW fonts makes writing documents with
> Cyrillic and other characters much easier should be documented
> somewhere--although, I don't know which one of the man pages (or the
> info manual) would be the best place to suit such information.
> 
> The built-in ru macro package can print a warning if enabled fonts lack
> support for Cyrillic script. Maybe such warnings in ru and other
> language-specific packages could be updated to ask a user to enable URW
> fonts?
> 
> > I have wished groff had a flag which let you pick the U- foundry for
> > all fonts, for many years, but alas!
> 
> I ran a little experiment to make groff always use URW fonts instead of
> default T* family, to no avail. I expected both of these snippets to
> work but neither of them did. If it did work, I imagine you could put it
> in a macro package and use it with -murw!
> 
>     .fp \n[.fp] TR U-TR
>     .fp \n[.fp] TI U-TI
>     .fp \n[.fp] TB U-TB
>     .fp \n[.fp] TBI U-TBI
> 
>     .fp \n[.fp] U-TR
>     .fp \n[.fp] U-TI
>     .fp \n[.fp] U-TB
>     .fp \n[.fp] U-TBI
>     .ftr TR U-TR
>     .ftr TI U-TI
>     .ftr TB U-TB
>     .ftr TBI U-TBI

The .ftr version does certainly "work", but there is a problem. :-(

Given:-

.ftr TR U-TR
.ftr TI U-TI
.ftr TB U-TB
.ftr TBI U-TBI

Then this works:-

.ft TR
Deri \f[TB]JAMES\f[TR]

But this does not:-

.ft TR
Deri \fBJAMES\fP

(Uses font TB rather than U-TB). The reason is because .fam is set to "T" even 
though all the fonts in the family now point to their U- cousins, so when 
style B is requested the computed font is TB and this does not appear to 
trigger a lookup of its replacement U-TB.

In case it is any use I've attached a tmac file.

Cheers 

Deri
.ftr AB U-AB
.ftr ABI U-ABI
.ftr AI U-AI
.ftr AR U-AR
.ftr BMB U-BMB
.ftr BMBI U-BMBI
.ftr BMI U-BMI
.ftr BMR U-BMR
.ftr CB U-CB
.ftr CBI U-CBI
.ftr CI U-CI
.ftr CR U-CR
.ftr HB U-HB
.ftr HBI U-HBI
.ftr HI U-HI
.ftr HNB U-HNB
.ftr HNBI U-HNBI
.ftr HNI U-HNI
.ftr HNR U-HNR
.ftr HR U-HR
.ftr NB U-NB
.ftr NBI U-NBI
.ftr NI U-NI
.ftr NR U-NR
.ftr PB U-PB
.ftr PBI U-PBI
.ftr PI U-PI
.ftr PR U-PR
.ftr S U-S
.ftr TB U-TB
.ftr TBI U-TBI
.ftr TI U-TI
.ftr TR U-TR
.ftr ZCMI U-ZCMI
.ftr ZD U-ZD

Reply via email to