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

Shunsaku Hirata shunsaku.hirata74 at gmail.com
Tue Oct 6 21:55:45 CEST 2020


Hi,

What about using the MKTEXPK variable in your texmf.cnf if you
just want to disable automatic PK font creation? I think this is the
only "standard" way to do this.

> 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".

I haven't heard anything about such a convention. And I think
there is no bug that needs to be "fixed".

> 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/)

Dvipdfmx calls "kpathsea_find_glyph".


Thanks,
Shunsaku Hirata


More information about the dvipdfmx mailing list.