[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] Wierd font troubles
From: |
Dale Snell |
Subject: |
Re: [groff] Wierd font troubles |
Date: |
Mon, 25 Mar 2019 18:46:31 -0700 |
Thank you for the info. The .t1 files in the URW++ base 35 package appear
to be PFB files. I tried replacing my FontForge-generated PFB files with
symlinks to the .t1 files, plus a link from URWGothic-Book.pfb to
a010013l.pfb. Then I re-ran configure, without using
--with-urw-fonts-dir=... configure found everything just as it should
have. BuildFoundries, alas, still pukes when trying to add the URW++ fonts.
Oh, and as for afmtodit, there are two versions on my system.
/usr/bin/afmtodit is v1.22.3, which is reasonable, since that's the version
of Groff included with Fedora 29. /usr/local/bin/afmtodit is v1.22.4.
Again reasonable since it comes from the latest Groff tarball. The local
version is the one my system uses by default.
--Dale
--
"And finally, _thinking_ is an exercise to which all too few brains are
accustomed." --E.E. "Doc" Smith, _First Lensman_
On Sun, Mar 24, 2019, 6:44 PM John Gardner <address@hidden> wrote:
> *Is there any way to use a .t1 file in groff?*
>
>
> You might find this article
> <https://www.freebsd.org/doc/en/articles/fonts/type1-fonts-groff.html>
> helpful. It was written a while ago, but I doubt anything's changed with
> Groff's font-handling that renders the page obsolete.
>
> *Convert it to .pfa, for instance?*
>
>
> A T1 file *is* a PFA file. Or a PFB, depending on whether the currentfile
> eexec block contains ASCII or binary data. As I said, there's no standard
> file extension for T1 fonts, and T1 itself doesn't say anything about how
> its encrypted portion (the lines after currentfile eexec…) is stored. If
> you open a T1, PFA or PFB file, you'll notice their headers are all
> PostScript source.
>
> On Mon, 25 Mar 2019 at 10:29, Dale Snell <address@hidden> wrote:
>
>>
>>
>> *P.S. What's a .t1 file?*
>>
>>
>> > T1 = Type 1 font file
>> <https://en.wikipedia.org/wiki/PostScript_fonts#Type_1>. It's a
>> PostScript program with an encrypted subset of drawing commands
>> > which produce letterforms. Note that there's no standard file extension
>> for Type 1 fonts; pfa and
>> > pfb are typically more common (PFA and PFB are more-or-less the same,
>> except the latter uses
>> > raw binary whilst the former uses ASCII. PFA = "Printer Font ASCII",
>> PFB = "Printer Font Binary").
>>
>> Thank you for the explanation. I wondered if it might not be something
>> like that, but as I said, the only description I could find was for the MRI
>> files. Is there any way to use a .t1 file in groff? Convert it to .pfa,
>> for instance? (I would not be surprised if the answer is no, but I thought
>> I should ask.)
>>
>> *When I ran make, BuildFoundries couldn't build the groff fonts, and I
>> don't know why.*
>>
>>
>> > I've not looked too thoroughly into Groff's makefiles, but you
>> shouldn't need to run make to generate
>> > font descriptions from AFM files. Are you using the afmtodit binary
>> (that should be) available in your
>> > $PATH?
>>
>> Make automatically runs BuildFoundries when Groff is built, it's in the
>> "build the URW++ Basic35 fonts" part of building Groff. I didn't have to
>> do anything special. And yes, afmtodit is in my $PATH.
>>
>>
>> *Then I created symbolic links to the apropriate old-style file names
>> and**ran
>> configure. Success! Huzzah!*
>>
>>
>> > Needless to say, you shouldn't have to be doing that. This is something
>> that should really be fixed
>> > on Groff's end...
>>
>> I'll certainly agree with that. My thought is that Groff should simply
>> include the URW++ fonts by default. Given that both Fedora and Debian have
>> deprecated Type1 support, it probably won't be too much longer before those
>> fonts won't be available from the distros' repositories at all.
>> Show quoted text
>> --Dale
>>
>> --
>> "And finally, _thinking_ is an exercise to which all too few brains are
>> accustomed." --E.E. "Doc" Smith, _First Lensman_
>>
>> On Sun, Mar 24, 2019, 2:38 PM John Gardner <address@hidden>
>> wrote:
>>
>>>
>>>>
>>>> *P.S. What's a .t1 file? My google-fu failed me; all I could find was
>>>> areference to "male MRI" files. Funny, I didn't know that MRI files
>>>> hadgender. At least, nobody said anything about it when my MRIs were
>>>> taken.*
>>>
>>>
>>> T1 = Type 1 font file
>>> <https://en.wikipedia.org/wiki/PostScript_fonts#Type_1>. It's a
>>> PostScript program with an encrypted subset of drawing commands which
>>> produce letterforms. Note that there's no standard file extension for Type
>>> 1 fonts; pfa and pfb are typically more common (PFA and PFB are
>>> more-or-less the same, except the latter uses raw binary whilst the former
>>> uses ASCII. PFA = "Printer Font ASCII", PFB = "Printer Font Binary").
>>>
>>> *When I ran make, BuildFoundries couldn't build the groff fonts, and I
>>>> don't know why.*
>>>
>>>
>>> I've not looked too thoroughly into Groff's makefiles, but you shouldn't
>>> need to run make to generate font descriptions from AFM files. Are you
>>> using the afmtodit binary (that should be) available in your $PATH?
>>>
>>>
>>>> *Then I created symbolic links to the apropriate old-style file names
>>>> and**ran configure. Success! Huzzah!*
>>>
>>>
>>> Needless to say, you shouldn't have to be doing that. This is something
>>> that should really be fixed on Groff's end...
>>>
>>> On Mon, 25 Mar 2019 at 07:24, Dale Snell <address@hidden> wrote:
>>>
>>>> Hi folks,
>>>>
>>>> I just updated my computer to Fedora 29, and downloaded the latest
>>>> version
>>>> of groff (1.22.4). When I ran configure, it couldn't find the URW++
>>>> fonts. Turned out I hadn't installed them. D'oh! Installed them, but
>>>> configure still couldn't find them. I added the --with-urw-fonts-dir
>>>> option, but configure _still_ couldn't find them. It took me some
>>>> digging
>>>> (and pulling out what little hair I have left), but I found a couple of
>>>> problems:
>>>>
>>>> 1) URW++ has changed their file names to something human-readable,
>>>> instead of the nigh-password-worthy names they used to use.
>>>>
>>>> 2) URW++ no longer ships *.pfb files in their base35 fonts package.
>>>> Insead, they ship *.otf, *.afm, and *.t1 files.
>>>>
>>>> configure looks in the urw-base35 fonts directory
>>>> ("/usr/share/fonts/urw-base35" in Fedora) for "a010013l.pfb", which is
>>>> now
>>>> "URWGothic-Book.pfb", to determine if the URW++ fonts are there.
>>>> Naturally, since the file didn't exist, it decided that there weren't
>>>> any
>>>> fonts to install. Thinking I could work around the problem, I used
>>>> FontForge to create .pfb files out of the .otf files. Then I created
>>>> symbolic links to the apropriate old-style file names and ran configure.
>>>> Success! Huzzah!
>>>>
>>>> Alas, it was too soon to cheer. When I ran make, BuildFoundries
>>>> couldn't
>>>> build the groff fonts, and I don't know why. The error message is:
>>>>
>>>> "BuildFoundries: warning: line 77: Failed to create groff font
>>>> 'U-AB'
>>>> by running afmtodit"
>>>>
>>>> where the line number increments by one for each groff font it can't
>>>> build.
>>>>
>>>> At this point I'm lost. I am not a Perl programmer, so I don't know
>>>> what
>>>> BuildFoundries is actually doing. There is probably something very
>>>> simple
>>>> going worng, but I don't know where to look.
>>>>
>>>> Anyway, I gave up on groff installing the fonts automatically and used
>>>> Peter Schaffter's "install-fonts.sh" script. Worked like a charm
>>>> (thanks
>>>> Peter!). So I installed several other typeface families (Linux
>>>> Libertine
>>>> and TeX Gyre, among others). All was well, or so I thought.
>>>>
>>>> I did some work on a project file and ran it through groff (via pdfmom)
>>>> to
>>>> build a PDF. It seemed to have worked until I looked more closely.
>>>> Much
>>>> to my surprise, the ASCII single-quote character "'" which is supposed
>>>> to
>>>> be rendered as a typographic single-quote, was still coming out as a
>>>> typewriter single-quote. I tried changing font families and found
>>>> something very odd. The fonts that groff installed work as expected.
>>>> The
>>>> ones I installed have the problem. I have no idea why. I can work
>>>> around
>>>> the problem by adding a ".tr '\[cq]" line to the source file. Still,
>>>> I'd
>>>> like to know where things went wrong so that I can fix it. Does anyone
>>>> have any suggestions? Right now I have no idea where to start looking.
>>>>
>>>> --Dale
>>>>
>>>> P.S. What's a .t1 file? My google-fu failed me; all I could find was a
>>>> reference to "male MRI" files. Funny, I didn't know that MRI files had
>>>> gender. At least, nobody said anything about it when my MRIs were
>>>> taken.
>>>>
>>>>
>>>> --
>>>> "And finally, _thinking_ is an exercise to which all too few brains are
>>>> accustomed." --E.E. "Doc" Smith, _First Lensman_
>>>>
>>>