Discussion:
Problem with `kpsewhich --all'
(too old to reply)
Werner LEMBERG
2018-04-07 10:39:34 UTC
Permalink
[SVN r46655 from Feb. 25th]

It seems that option `--all' of `kpsewhich' has an undocumented
limitation: It doesn't work for PK files.

Consider the following setup.

$ locate '*cmr10.*pk'
/home/wl/.texlive2017/texmf-var/fonts/pk/ljfour/public/cm/cmr10.600pk
/usr/local/backup/TeXLive/Master/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk

$ kpsewhich --all cmr10.600pk
/home/wl/.texlive2017/texmf-var/fonts/pk/ljfour/public/cm/cmr10.600pk

$ PKFONTS='/usr/local/backup/TeXLive/Master/texmf-dist/fonts/pk//' \
kpsewhich --all cmr10.600pk
/usr/local/backup/TeXLive/Master/texmf-dist/fonts/pk/ljfour/public/cm/dpi600/cmr10.pk

As can be seen, there are two PK files of `cmr10' for 600dpi. I would
expect that the first call to `kpsewhich' finds both fonts. However,
I have to explicitly set `PKFONTS' to get the second one.

Looking into the debug output I see

kdebug:start search(file=cmr10.600pk, must_exist=0, find_all=0, ...)

So `find_all' is set to value 0, contrary to, say, a search for a
`.tex' file.

Is this intended behaviour?


Werner
Akira Kakuto
2018-04-07 13:48:52 UTC
Permalink
Dear Werner,
Post by Werner LEMBERG
It seems that option `--all' of `kpsewhich' has an undocumented
limitation: It doesn't work for PK files.
Thanks a lot.
kpse_pk_format,
kpse_gf_format, and
kpse_any_glyph_format
do not support --all switch.
I don't know that is documented or not. Karl?

Best,
Akira
Karl Berry
2018-07-02 20:52:41 UTC
Permalink
It seems that option `--all' of `kpsewhich' has an undocumented
limitation: It doesn't work for PK files.

I documented it, and made kpsewhich give a warning if it is used.

Unfortunately actually making it work seemed impractical, given the many
peculiarities of glyph search. -k
Akira Kakuto
2018-07-05 10:43:53 UTC
Permalink
Dear Ilya Zakharevich,
Unfortunately, no. This file is freshly generated by ImageMagick's
convert. This unfortunate property survives all the conversions.
I tried by using the convert in ImageMagick:

convert -geometry 202x38 -verbose try-tl2018a.png small.png

Obtained small.png seems to be good.

extractbb shows:

%%Title: try-tl2018a.png
%%Creator: extractbb 20180506
%%BoundingBox: 0 0 73555 13810

Note that 73555bp is larger than 2^30sp, so calculation
is impossible as a TeX dimension.

Best,
Akira
Akira Kakuto
2018-07-05 23:27:17 UTC
Permalink
Post by Akira Kakuto
convert -geometry 202x38 -verbose try-tl2018a.png small.png
A better example.

identify -verbose try-tl2018a.png
shows

Resolution: 0.39x0.39
Units: PixelsPerCentimeter

This is the reason of the large size (0.39 pixel / cm !!!)

The command

convert -units PixelsPerCentimeter -density 28 -verbose try-tl2018a.png small.png

creates a better result than my previous example.

Resolution: 28x28
Units: PixelsPerCentimeter

Best,
Akira

Loading...