[Fontinst] avoiding spaces in fd files

Lars Hellström Lars.Hellstrom at residenset.net
Fri May 28 12:10:28 CEST 2010

Dr. Clea F. Rees skrev:
> This is not a big deal but I wondered if there is a way of avoiding the
> problem. If I use the following command:
> \installfamily{T1}{xyz}{\hyphenchar\font=\m at ne}
> or:
> \installfamily{T1}{xyz}{\hyphenchar\font=45}
> fontinst introduces spaces into the fd files. That is, it will write
> something like:
> \DeclareFontFamily{T1}{clmd}{\hyphenchar \font = 45}
> rather than:
> \DeclareFontFamily{T1}{clmd}{\hyphenchar\font=45}
> This is bad because pdfTeX, at least, does not like the spaces so the
> files have to be hand-edited (or sed-edited, at least) afterwards.

That's odd; I'd expect it to be

   \DeclareFontFamily{T1}{clmd}{\hyphenchar \font =45}

(no space after the =), and pdfTeX should have no problem with this 
(regardless of whether there is a space after =) even if it looks ugly.

> Is this a known problem? Is there a good way around it?

What is a known problem is

   \installfamily{T1}{xyz}{\hyphenchar\font=\m at ne}

since this tokenizes the same as

   \installfamily{T1}{xyz}{\hyphenchar \font =\m @ne}

and TeX will write the argument that way, as an instance of the rule to 
put a space after each control sequence to clarify where it ends. 
Trying to parse "\m @ne" as a number is something all TeXes will find 

As for good way around it... Writing \hypenchar\font=-1 is one 
possibility; it costs one token more, but that is negligible in 
comparison to all the rest.

I think this is a topic where other list subscribers might have more 
suggestions, though.

Lars Hellström

More information about the fontinst mailing list