groff
[Top][All Lists]
Advanced

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

Re: Anyone want to write an article about fonts in groff?


From: Walter Alejandro Iglesias
Subject: Re: Anyone want to write an article about fonts in groff?
Date: Wed, 16 Aug 2023 18:12:59 +0200

Hi Jim,

On Sat, Aug 12, 2023 at 03:48:21PM -0500, Jim Hall wrote:
> Hi everyone!
> 
> I was thinking about writing a few articles for Technically We Write
> about fonts in groff. But I thought "This would be a great article for
> someone else to write" so I wanted to suggest it here.
> 
> Here are two article ideas:
> 
> 1. An article about how fonts work in groff (each is "mounted" to a
> different font "position" number) and showing how to use different
> fonts in a groff document. For example, to mount Helvetica Narrow
> (HNR) to font position 5 (I think that's unused in -me) and set the
> .sh and .uh fonts in -me to that:
> 
> .fp 5 HNR
> .nr sf 5
> 
> 2. How to convert a TrueType font and use them in groff documents. I
> found this how-to article that seems to explain it pretty well, but I
> haven't tried it yet:
> 
> http://www.port.de/cgi-bin/groff/AddingFonts
> 
> 
> If anyone is interested in writing an article like this, let me know!


What I'll tell you could be useful to whoever decide to write the
article, but not in the sense of simplifying the process, quite the
opposite :-).

About your second point, I recently wrote this:

  http://en.roquesor.com/groff.html

What I observed and didn't mention in my article is that adding .t42
files to the devps directory (and the entries to the devps/downloads
file) the result is better than putting there .pfa files.  And also
that, at least with EBGaramond and other OFT and TTF fonts I tried,
you need to include these files, without them, the result font shows
wrong glyphs, the line width won't be correctly adjusted, and the main
one: the font will look almost +5 points bigger than without adding the
.t42 files.

After reading Petrovic's article I got curious about if using pdftex's
utilities I could get the same result than using fontforge so, to narrow
the differences, I added the mentioned two steps to Petkovic's tutorial;
besides ttf2afm, I used ttftotype42 to add the *.42 files to the devps
directory and also added the entries to the downloads file.  This time,
the result was at first sight identical, but when I reviewed my document
in detail I noticed that, by an almost imperceptible tiny difference,
lines didn't take the same amount of width space generating erratic
widows and orphans.  This is a point to take in care, once you've found
a method that works for you case don't change it :-).


> 
> 
> Jim
> 
> 


-- 
Walter



reply via email to

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