tectonic
tectonic copied to clipboard
Cannot generate font "ifwea10" on-the-fly
Hi,
I have a document that compiles correctly via pdflatex
, but fails with tectonic
with the following error:
note: Running xdvipdfmx ...
warning: Tectonic unable to generate PK font "ifwea10" (dpi 480) on-the-fly
warning: Could not locate a virtual/physical font for TFM "ifwea10".
warning: >> There are no valid font mapping entry for this font.
warning: >> Font file name "ifwea10" was assumed but failed to locate that font.
error: Cannot proceed without .vf or "physical" font for PDF output...
Is this something that can be worked around?
I don't think that there's an elegant solution, but the simplest workaround would be to extract the font files from your pdflatex
install and copy them into your document directory; I think that it would suffice to find and copy over ifwea10.pfb
and ifwea10.tfm
, but it would probably be easiest/most reliable to just copy over every ifwea10.*
file that you can find.
Do you know which package you're using that pulls in this font? It may be something that we can add in when we update the default Tectonic support file "bundle", whenever that is able to happen.
I am pretty sure it is
\usepackage[weather]{ifsym}
it contains meteorological symbols.
I copied over all files ifwea10.*
that i could find in my TeXLive installation, they are /usr/share/texmf-dist/fonts/source/public/ifsym/ifwea10.mf
and /usr/share/texmf-dist/fonts/tfm/public/ifsym/ifwea10.tfm
in Arch Linux's texlive-fontsextra
package.
The error remained unchanged (I guess I'm missing ifwea10.pfb
, but according to the package manager no package declares such file.
Yeah, you're still missing a few of the necessary font files, and you're probably not finding them because they're generated on-the-fly by your TeX system, deriving from the ifwea10.mf
MetaFont file. So (1) they're not known to the package manager and (2) they won't end up in a directory like /usr/share/...
since those directories are read-only. You might find them somewhere in a directory named something like ~/.texlive*/
, or possibly in a /var/
directory.
I now copied these files: ifwea10.480pk
ifwea10.600pk
ifwea10.mf
ifwea10.tfm
into the root document folder, which are everything ifwea*
I could find on my file system. I still have issues with compilation, relevant log:
warning: Tectonic unable to generate PK font "ifwea10" (dpi 480) on-the-fly
warning: Could not locate a virtual/physical font for TFM "ifwea10".
warning: >> There are no valid font mapping entry for this font.
warning: >> Font file name "ifwea10" was assumed but failed to locate that font.
error: Cannot proceed without .vf or "physical" font for PDF output...
I guess I'm missing ifwea10.pfb
that you suggested above, but I have no such file on my file system (nor I could find it online).
Thanks for digging deeper on this. Maybe the .pfb
is only generated as a temporary or something? It would be good to track down a solution to this issue and document it for posterity! I am not sure if I personally am going to be able to find the chance to do that any time soon, unfortunately.
This is in the log if I run pdflatex
and looks related, but I don't know which information to extract from it:
<./ifwea10.600pk> <./ifwea10.480pk>{/usr/share/texmf-dist/fonts/enc/dvips/base/8r.enc}</usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb></usr/share/texmf-dist/fonts/type1/urw/courier/ucrb8a.pfb></usr/share/texmf-dist/fonts/type1/urw/courier/ucrr8a.pfb></usr/share/texmf-dist/fonts/type1/urw/courier/ucrro8a.pfb></usr/share/texmf-dist/fonts/type1/urw/times/utmb8a.pfb></usr/share/texmf-dist/fonts/type1/urw/times/utmbi8a.pfb></usr/share/texmf-dist/fonts/type1/urw/times/utmr8a.pfb></usr/share/texmf-dist/fonts/type1/urw/times/utmri8a.pfb>
Oh, I think I see what's going on here. We're hitting the code here:
https://github.com/tectonic-typesetting/tectonic/blob/734cb664c0b502084d249809660b9619d080947e/crates/pdf_io/pdf_io/dpx-pkfont.c#L85
which in this instance should be trying to open the .480pk
file, but that whole codepath is avoided in Tectonic, because in general it requires invocation of the on-the-fly font tools that Tectonic doesn't support. But in principle, I think that the function could work if we just see if the specific file is available.
Without making that change, it's possible that things will work if you make a copy of ifwea10.480pk
named ifwea10.pk
? That's just a guess, but I think that might avoid having to call this function altogether.
I think this could be fixed by implementing more of the dpx_open_pk_font_at
codepath: we could look for the needed file even if we remain unable to try to generate it ourselves. On the other hand, it wouldn't be exactly user-friendly to need people to generate and copy around these .${DPI}pk
files,
Even if it is user-unfriendly, if we find a solution I think that it is better to print out clear guidance information than failing. Something like:
Tectonic does not allow invocation of the on-the-fly tools required to generate <whatever>.480pk.
This is a well-known limitation documented in our knowledge base at ...
The recommended workaround is find file <...> and copy it in the main document folder with the name <...>
I've ran this: cp ~/.texlive/texmf-var/fonts/pk/ljfour/public/ifsym/ifwea10.480pk ifwea10.pk
, but when running tectonic -Z shell-escape paper-2021-ieee-iot-pulverisation-simulation-methodology.tex
I still get:
Running xdvipdfmx ...
warning: Tectonic unable to generate PK font "ifwea10" (dpi 480) on-the-fly
warning: Could not locate a virtual/physical font for TFM "ifwea10".
warning: >> There are no valid font mapping entry for this font.
warning: >> Font file name "ifwea10" was assumed but failed to locate that font.
error: Cannot proceed without .vf or "physical" font for PDF output...
Thanks for investigating! You're definitely right that we should at least be providing a more useful error message. And if there's no way to work around the issue in the current implementation, one should be added.
No problem, let me know if there is any other experiment that could be useful. I'm glad to help.
I have a similar issue with tectonic
and the font urw-garamond
, on Arch Linux:
warning: Tectonic unable to generate PK font "ugmm8a.pfb" (dpi 600) on-the-fly
Is there any way to get this font to work with tectonic
?
I have a similar issue with
tectonic
and the fonturw-garamond
, on Arch Linux:warning: Tectonic unable to generate PK font "ugmm8a.pfb" (dpi 600) on-the-fly
Is there any way to get this font to work with
tectonic
?
This is a Type 1 font, so not the now common OpenType format, but it should work still work with Tectonic/TeX. Given that you are using Tectonic (based on XeTeX) can you perhaps get away with using garamond-libre, which is in the modern format and much easier to handle in general?
If you have to use urw-garamond
I am sure it should be possible, and not that hard as with ifwea10
, which is concerned with Metafont.
Because of that, @BachoSeven can you please open a new issue, provide a MWE so that we can see exactly what doesn't work for you? As Tectonic is based on XeLaTeX and can be largely expected to behave the same, does your MWE work with XeLaTeX? Generally if something doesn't/can't work with XeLaTeX it is largely expected to be the case also with Tectonic.
I would guess that either there is a problem in our bundle, (which may be remedied soon, as a new bundle is on it's way) or in the way you use the font.
@vlasakm I think my issue is very close to OP's, so it should be specific to tectonic
...
thanks for the suggestion regarding garamond-libre
!