type1 fonts in sample fontconfig

Karl Berry karl at freefriends.org
Sat May 1 00:38:17 CEST 2021

Hi David - belatedly ...

    [ https://tug.org/pipermail/tex-live/2021-April/046700.html ]

    dvipdfmx is loading the type1 font from
    rather than the truetype version.
    as the fontconfig is (I think?) just for xelatex, is it useful to include
    the type1 directory at all?

In principle yes, as there are fonts only available as Type1.

In practice maybe not, since it's improbable that anyone would want to
access those Type1-only fonts as system fonts. I seem to recall
that some systems have dropped support for Type 1 as system fonts.

    Possibly separately would it be possible for xdvipdfmx to only use the
    type1 font if no matching truetype or opentype is found?

Sure, that would be better.  Question is whether the fontconfig api
allow specifying the format that get returned.  I have a vague
impression that the search is based only on names and if two fonts have
the same name, it's not controllable which gets returned. Thus, xetex
might get the ttf and dvipdfmx get the t1 (or you might get the ttf one
year and the t1 the next), but it can't be solved by us. In which case
removing the /type1 line from our sample fontconfig would be indicated.

In principle, XeTeX and dvipdfmx should always load the same font with
the same fontconfig. This failing to happen has been the source of
myriad problems over the years.

    I had a test file

Can you send your test file with failing fontconfig.conf to
dvipdfmx at tug.org please? So Shunsaku et al. can investigate whether
something has changed and/or can be fixed.

    xdvipdfmx:fatal: Invalid font: -1 (0)

A more informative error message would be useful too. At least including
something about the name of the font being looked up.

    np> I strongly advise not including any toplevel directory
    of the texmf-dist/fonts/XXX into fontconfig - 

Our sample file fonts/conf/texlive-fontconfig.conf doesn't have any
reasonable alternative to including the top-level directories, it seems
to me.

    I have seen several bad
    breakages with strange fonts making fontconfig stumble.

Me too. Of course it would be nice if those bugs could be fixed. -k

More information about the tex-live mailing list.