unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40558: Modular TexLive "Insufficient extension fonts" and duplicate fonts
@ 2020-04-11 16:15 Jelle Licht
  2020-04-20 19:31 ` Jelle Licht
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Jelle Licht @ 2020-04-11 16:15 UTC (permalink / raw)
  To: 40558

[-- Attachment #1: Type: text/plain, Size: 4887 bytes --]

I think I found a bug in our amsfonts texlive package. I will describe
my journey in finding this bug, as I still do not have clear picture
on the why/when/what is going on. I think I also saw several other
people running into this issue the last few months, so either way I am
happy to have found something reproducible that at least demonstrates
that I am sane :).

The eror message is:
" ! Math formula deleted: Insufficient extension fonts."

If you, like me, want to use Emacs' org-mode capabilities and export to
pdf using latex, by default you will generate an intermediate .tex file
that uses the ulem package. Using this package leads to the
aforementioned error message.

(Skip everything after this if you do not care about my descent into madness)

I used a profile containing the following (relevant) texlive packages:
--8<---------------cut here---------------start------------->8---
texlive-base	
texlive-latex-preview	
texlive-latex-base	
texlive-latexconfig	
texlive-fonts-ec	
texlive-latex-oberdiek	
texlive-latex-wrapfig	
texlive-generic-ulem	
texlive-latex-capt-of	
texlive-latex-hyperref
texlive-amsfonts	
texlive-fontinst	
texlive-metafont-base	
texlive-unicode-data	
texlive-pstool	
texlive-cm	
texlive-cm-super	
texlive-latex-amscls	
texlive-fonts-latex	
texlive-latex-amsmath	
--8<---------------cut here---------------end--------------->8---


I ran both `strace pdflatex working 2> working-strace.log' and `strace
pdflatex broken 2> broken-strace.log' See the attached `working.tex'
and `broken.tex' for tiny examples that demonstrate this.

The relevant part of the diff between straces:

* Working:
--8<---------------cut here---------------start------------->8---
access("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm", R_OK) = 0
stat("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm", {st_mode=S_IFREG|0444, st_size=940, ...}) = 0
openat(AT_FDCWD, "/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0444, st_size=940, ...}) = 0
read(6, "\0\353\0\2\0\0\0\177\0#\0\6\0\16\0\3\0\0\0\0\0\34\0\r\27#\260\255\0p\0\0"..., 4096) = 940
close(6)                                = 0
openat(AT_FDCWD, "working.pdf", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6
write(1, " [1", 3)                      = 3
--8<---------------cut here---------------end--------------->8---

* Broken:
--8<---------------cut here---------------start------------->8---
access("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm", R_OK) = 0
stat("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm", {st_mode=S_IFREG|0444, st_size=1312, ...}) = 0
openat(AT_FDCWD, "/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0444, st_size=1312, ...}) = 0
read(6, "\1H\0\21\0\0\0\332\0*\0\20\0\20\0\6\0\0\0\0\0\0\0\6d\235jM\0\240\0\0"..., 4096) = 1312
close(6)                                = 0
write(1, "\n", 1)                       = 1
write(1, "! Math formula deleted: Insuffic"..., 54) = 54
--8<---------------cut here---------------end--------------->8---

We see that a different file is used when resolving the same font!
Furthermore, one of these fonts is a totally different size than the
other.


If we run: `guix build --check texlive-amsfonts | grep cmex7', we see:
--8<---------------cut here---------------start------------->8---
Font metrics written on /tmp/guix-build-texlive-amsfonts-49435.drv-0/source/build-fonts/cmex7.tfm.
Output written on /tmp/guix-build-texlive-amsfonts-49435.drv-0/source/build-fonts/cmex7.600gf (128 characters, 30684 bytes).
Transcript written on /tmp/guix-build-texlive-amsfonts-49435.drv-0/source/build-fonts/cmex7.log.
converting afm font cmex7
cmex7 CMEX7
`build-fonts/cmex7.600gf' -> `/gnu/store/hrxlw7s1d8q0z5kipizjr7ib49bw4hjp-texlive-amsfonts-49435/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.600gf'
`build-fonts/cmex7.tfm' -> `/gnu/store/hrxlw7s1d8q0z5kipizjr7ib49bw4hjp-texlive-amsfonts-49435/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm'
`build-fonts/euler/cmex7.tfm' -> `/gnu/store/hrxlw7s1d8q0z5kipizjr7ib49bw4hjp-texlive-amsfonts-49435/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm'
--8<---------------cut here---------------end--------------->8---

AFAIK, and from looking at the full (and correctly working)
texlive-texmf build, the cmex7.tfm in `euler' is not correctly build.
My best guess is that this happens because cmex has both a mf file and a
afm file in `guix build --source texlive-amsfonts'. The one 'built'
using afm2tfm seems to be broken and/or not matching other metadata
generated, as given by this example.

Thanks for reading along, I hope we will find a solution to this, as
non-modular texlive is simply the worst :).

[-- Attachment #2: working.tex --]
[-- Type: application/x-tex, Size: 102 bytes --]

[-- Attachment #3: broken.tex --]
[-- Type: application/x-tex, Size: 120 bytes --]

[-- Attachment #4: Type: text/plain, Size: 10 bytes --]


 - Jelle

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-02-15 16:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 16:15 bug#40558: Modular TexLive "Insufficient extension fonts" and duplicate fonts Jelle Licht
2020-04-20 19:31 ` Jelle Licht
2022-02-11 19:39   ` Ricardo Wurmus
2020-05-09 10:47 ` bug#40558: (no subject) elaexuotee
2020-05-12 12:36   ` Jelle Licht
2020-10-26 22:10   ` Ricardo Wurmus
2021-02-03  9:57     ` elaexuotee--- via Bug reports for GNU Guix
2022-01-21 17:21       ` bug#40558: Modular TexLive "Insufficient extension fonts" and duplicate fonts Ricardo Wurmus
2022-01-21 23:42         ` elaexuotee--- via Bug reports for GNU Guix
2022-01-22  7:50           ` Ricardo Wurmus
2022-01-23  2:53             ` elaexuotee--- via Bug reports for GNU Guix
2022-01-23 10:55               ` Ricardo Wurmus
2022-02-11 14:58         ` zimoun
2022-02-15 16:34 ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).