groff
[Top][All Lists]
Advanced

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

try to use ttf fonts with groff


From: Marc Chantreux
Subject: try to use ttf fonts with groff
Date: Fri, 22 Oct 2021 00:46:14 +0200

hello people,

I tried to use TTF from goff. As i haven't found something helpful from
the manual (did i miss something?), i gave google a try.

I found ttf2pt1 (http://ttf2pt1.sourceforge.net/) but it was removed
from debian 12 years ago (is it worth to try it ?). Then i found some
examples and end up with this:

makefile | logo.ps:
         | %.ps: %.pic
         |      groff -k -p -F fonts $< >$@

logo.pic | .PS
         | .ps 12
         | .fam LR
         | box wid .4
         | A: box wid .1
         | box wid 1.3 "ttf try"
         | box wid .4
         | box wid .1
         | .PE

I picked LiberationMono-Regular.ttf from my system and wrote:

basename -s .ttf *f|
    sed 's/.*/Open("&.ttf"); Generate("&.pfa");/' |
    fontforge -lang=ff -script -
rm -rf fonts
mkdir -p fonts/devps/generate
touch fonts/devps/generate/textmap
xargs -n2 sh -c '
    afmtodit $1.afm fonts/devps/generate/textmap $2
    mv -t fonts/devps $1.pfa $2
' -- <<.
LiberationMono-Regular LR
.

I had a lot of messages like those ones so "something" happened

both Ohm and Omegagreek map to u03A9 at /usr/bin/afmtodit line 6519.
both S and S_BE map to u0053 at /usr/bin/afmtodit line 6519.
both macron and macron_referred map to u00AF at /usr/bin/afmtodit line 6519.
both mu and mugreek map to u03BC at /usr/bin/afmtodit line 6519.

make -B
groff -k -p -F fonts logo.pic >logo.ps
troff: logo.pic:3: warning: can't find font 'LRR'

if i remove the R, i got

groff -k -p -F fonts logo.pic >logo.ps
troff: logo.pic:6: warning: can't find character 't'
troff: logo.pic:6: warning: can't find character 't'
...

At this point, i have the feeling i have no idea what i actually did.
Any help or pointer would help.

regards,
marc






reply via email to

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