[dvipdfmx] "mktexpk" is not disabled for fonts loaded by relative path

Igor Liferenko igor.liferenko at gmail.com
Tue Oct 6 10:34:45 CEST 2020


Hi,

I need to disable automatically calling "mktexpk" on a font in dvipdfmx.
The standard way to do this (used by dvips) is to load the font via
absolute or relative path, like this:

    \font\x=./myfont

But dvipdfmx fails to follow this convention. The result is that I
cannot use dvipdfmx with locally created fonts.
(see more at https://tex.stackexchange.com/questions/565446/)

Please fix "dvipdfmx" that it will work like "dvips".
In "dvips" source file "search.c" there is this code:

    string found_name = kpse_find_pk (file, dpi, &font_file);

which is called by

    pkfile = pksearch(this_name, READBIN, fd->dpi, &name_ret, &dpi_ret);

in pkopen().

"kpse_find_pk" is part of "kpathsea" library. It eventually calls
"kpathsea_find_glyph".
This is the relevant code from tex-glyph.c

    /* If not an alias, try creating it on the fly with mktexpk,
       unless FONTNAME is absolute or explicitly relative.  */
    if (!ret && !kpathsea_absolute_p (kpse, fontname, true)) {

So, kpathsea_absolute_p returns true when filename is explicitly relative.
The result is that "mktexpk" is not called in dvips.
(see more at https://tex.stackexchange.com/questions/479434/)

Best,
Igor


More information about the dvipdfmx mailing list.