[tex-k] Minor problems in kpathsea's fontmap.c

Doug McKenna doug at mathemaesthetics.com
Tue Nov 12 00:54:33 CET 2019

Karl -

A fair response, thanks.  Except that the self-referential comment line is being entered into the hash table, which is clearly incorrect, even though (or because) it causes no problems.

Also, there are two types of comments, the last '%' in the line, or the first '@c' in the line.  So you are ignoring file names that start with '@c'.  They are no doubt similarly rare to non-existent.

Glad to know it's all a tempest in a teapot.  I will move on.

- Doug McK.

----- Original Message -----
From: "Karl Berry" <karl at freefriends.org>
To: "doug" <doug at mathemaesthetics.com>
Cc: "tex-k" <tex-k at tug.org>
Sent: Monday, November 11, 2019 4:43:10 PM
Subject: Re: [tex-k] Minor problems in kpathsea's fontmap.c

Doug - almost all of your comments are well taken, but one point:

    the test for a % comment on the line is done with strrchr(),

It's intentional. (see also commen)

    % Comments (obviously) start with %.
    is not only false 

It seems correct to me. It does not say that the first % on a line
starts a comment. Only that comments start with %.
See also comments at the top of texfonts.map about its syntax.

    (and not obviously), 

Indeed, I never write "obviously" or "of course" nowadays. I was more
dogmatic in those years :).

    font file names in the TDS starting with a % should always be illegal,

That is precisely why I used strrchr -- because I did not want to make
names containing % invalid. In general, I tried to allow any character
in names wherever possible in kpse, though granted that
whitespace-delimited fields and such are not good evidence of that.

By the way, I think the whole texfonts.map feature could go away today
and no one would notice. Not that I'm going to remove it myself, but I
suspect you could omit reimplementing it if you wished. The lcircle
fonts haven't had their names changed in a long time. I have never heard
of anyone else using it for anything. --best, karl.

More information about the tex-k mailing list