[BUG] Cannot proceed without the font: [...].woff2 problem
Nikolay Shaplov
dhyan at nataraj.su
Wed Apr 2 16:54:42 CEST 2025
Some users (me included) reports getting error message
xdvipdfmx:fatal: Cannot proceed without the font: /home/nataraj/.local/share/
fonts/Gilroy-Regular.woff2
wile running xelatex utility. File /home/nataraj/.local/share/fonts/Gilroy-
Regular.woff2 actually exists, and this confuses most of all.
Users at https://bbs.archlinux.org/viewtopic.php?id=263072 also report same
thing.
I managed to figure out how to reproduce it, and how to work it around. But I
am not able to fix it. I hope you will do it.
How to reproduce:
1. Take test.tex from the attachment.
2. Download Gilroy font from https://xfonts.pro/font-family/gilroy (Or find
it in ant other place. We need .woff2 format here)
3. Put all content of font.zip into ~/.local/share/fonts or where ever user's
font should be placed in your system
4. Run fc-cache -f -v to make sure fonts are properly indexed (Or similar
thing for non-debian systems)
5. Run
xelatex test
6. Get an error
xdvipdfmx:fatal: Cannot proceed without the font: /home/nataraj/.local/share/
fonts/Gilroy-Regular.woff2
This /home/nataraj/.local/share/fonts/Gilroy-Regular.woff2 file actually exists
and this confuses a lot.
What Causes The Bug:
texk/dvipdfm-x/dvi.c has a code
if ((path = dpx_find_dfont_file(filename)) != NULL &&
(fp = MFOPEN(path, "rb")) != NULL)
is_dfont = 1;
else if ((path = dpx_find_type1_file(filename)) != NULL)
is_type1 = 1;
else if (((path = dpx_find_opentype_file(filename)) == NULL
&& (path = dpx_find_truetype_file(filename)) == NULL)
|| (fp = MFOPEN(path, "rb")) == NULL) {
ERROR("Cannot proceed without the font: %s", filename);
}
It tries to open font file this way or that way and if there is no success it
throws an error.
Suggestion how to fix it:
1. I guess .woff2 fonts should be ignored at all, if they can't be properly
loaded. (I actually do not know what is woff2 and how it should work, the only
thing I know: it does not work)
2. If there is still font file that can't be loaded, you should have different
error texts for cases: "can't open a font file", and "Font file format is not
supported", so people were not confused anymore if they have some broken font
file, or font-file with unsupported version or something.
Since I do not understand many things here I will dare not suggesting a patch.
Workaround:
I've just deleted all .woff and .woff2 files from ~/.local/share/fonts and
everything started working for me.
I hope somebody will manage to fix that, and there won't be any problems with
that strange error message
--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: text/x-tex
Size: 114 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20250402/73093b4e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://tug.org/pipermail/tex-live/attachments/20250402/73093b4e/attachment.sig>
More information about the tex-live
mailing list.