groff
[Top][All Lists]
Advanced

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

Re: Small error in install-font from Peter Schaffter


From: Peter Schaffter
Subject: Re: Small error in install-font from Peter Schaffter
Date: Sun, 11 Dec 2022 21:06:46 -0500
User-agent: Mutt/1.9.4 (2018-02-28)

On Sun, Dec 11, 2022, Wim Stockman wrote:
> I found a small error in the install-font script of Peter Schaffter from
> the mom macros
> Link: https://www.schaffter.ca/mom/bin/install-font.sh
> 
> The generated internalname is missing a "-" between font family and
> font-style
> 
> For instance, for the font FreeSerifBoldOblique.otf
> FreeSerifBI
> the internalname is wrong.
> The script generates as internalname FreeSerifBoldItalic
> and it should be: FreeSerif-BoldItalic.
> There needs to be a little "-" between font family name and the font style
> name.
> if you embed the font in your pdf you will not notice it.
> But if you don't embed them , they will be randomly substituted by pdf
> viewers even if you have the font installed in linux because it doesn't
> find the right one.

(Wim sent me a patched version of install-font off list.  Attached
if anyone is interested.)

In install-font, internal names are grabbed from the .afm fontforge
creates.  A lot of .afms already observe the Family-Style
convention.  However, the ones that don't can't be guaranteed to
observe any sort of naming convention that reliably allows slicing
out a valid Style from the name and tacking it onto the end with a
hyphen.  Even some fonts that are properly named can get mangled.
For example, your patch to install-font produces internal name
'Americana-ItalicBT' instead of (un-awked) 'AmericanaBT-Italic'.

I'm not sure what can be done about this because internal names are
in the hands of the font creator.

-- 
Peter Schaffter
https://www.schaffter.ca

Attachment: install-font-patched.sh
Description: Bourne shell script


reply via email to

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