Bug 1902304

Summary: xelatex/fontspec do not find 'TeX Gyre *' fonts but do find 'TeX Gyre * Math'
Product: [Fedora] Fedora Reporter: ponor.hr
Component: texliveAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: caznaranl, redhat-bugs, spotrh, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: texlive-2020-34.fc32 texlive-2020-34.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-16 01:27:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ponor.hr 2020-11-27 16:26:51 UTC
Description of problem:
In Fedora 33, xelatex/fontspec do not find any of the  'TeX Gyre *' fonts, but do find 'TeX Gyre * Math'. 
So any document that had, for example,
 \usepackage{fontspec}
 \setmainfont[Mapping=tex-text]{TeX Gyre Pagella}
will not compile.

In LyX, only the 'TeX Gyre * Math' fonts will be listed when 'Use non-TeX fonts' is enabled. This is a regression.

With lualatex/fontspec the fonts are found.

Version-Release number of selected component (if applicable):
texlive-base-20200327-18.fc33.x86_64
texlive-tex-gyre-svn48058-32.fc33.noarch
texlive-tex-gyre-math-svn41264-32.fc33.noarch
texlive-fontspec-svn53860-32.fc33.noarch
texlive-xetex-20200327-18.fc33.x86_64


Steps to Reproduce:
save as tex file and run xelatex 

----
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\begin{document}
 Does not compile with xelatex. 
 Package fontspec Error: The font "TeX Gyre Pagella" cannot be found.
\end{document}
----

Comment 1 Tom "spot" Callaway 2020-12-07 18:23:43 UTC
Like many things in TeX, this error message is confusing.

The issue is that when you are searching for font names (instead of filenames), the tooling looks for _system_ fonts. Which is somewhat ludicrous, but whatever.

The reason that the TeX Gyre * Math fonts work is because in texlive-tex-gyre-math I have a symlink between /usr/share/fonts/tex-gyre-math and /usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre-math, so the OTF files show up in the system fonts list (as managed by fontconfig).

The reason that I do not have the same symlink in the texlive-tex-gyre package is because some of the TeX Gyre fonts are packaged separately in Fedora. Specifically, "Heros" (lilypond-texgyre-heros-fonts), "Cursor" (lilypond-texgyre-cursor-fonts), and "Schola" (lilypond-texgyre-schola-fonts). For most fonts in Fedora, this would result in a conflict between a directory and a symlink, which is bad... but in this case, because the system fonts are under /usr/share/fonts/lilypad/ ... we can dodge the issue by making the symlink in a location that does not conflict, and it resolves the issue:

   sudo ln -s /usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre /usr/share/fonts/tex-gyre

I will make an update that fixes this, but you can manually create the symlink using the command above as a workaround in the interim.

Comment 2 Fedora Update System 2020-12-07 22:15:16 UTC
FEDORA-2020-ab39240261 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-ab39240261

Comment 3 Fedora Update System 2020-12-07 22:15:17 UTC
FEDORA-2020-25fb794a6b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-25fb794a6b

Comment 4 ponor.hr 2020-12-08 14:27:36 UTC
(In reply to Tom "spot" Callaway from comment #1)
> Like many things in TeX, this error message is confusing.
> 
> The issue is that when you are searching for font names (instead of
> filenames), the tooling looks for _system_ fonts. Which is somewhat
> ludicrous, but whatever.


Yeah, another weird decision to force people do what machines could. 

 
>    sudo ln -s /usr/share/texlive/texmf-dist/fonts/opentype/public/tex-gyre
> /usr/share/fonts/tex-gyre
> 
> I will make an update that fixes this, but you can manually create the
> symlink using the command above as a workaround in the interim.

This worked, thanks a lot!

Comment 5 Fedora Update System 2020-12-08 16:18:11 UTC
FEDORA-2020-25fb794a6b has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-25fb794a6b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-25fb794a6b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-12-08 16:53:12 UTC
FEDORA-2020-ab39240261 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-ab39240261`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-ab39240261

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-12-16 01:27:17 UTC
FEDORA-2020-25fb794a6b has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2020-12-31 02:02:09 UTC
FEDORA-2020-ab39240261 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.