Bug 1278049

Summary: Default search directories do not include the location of TeX Live fonts
Product: [Fedora] Fedora Reporter: Dimitrios Christidis <dimitrios>
Component: texliveAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fonts-bugs, i18n-bugs, novyjindrich, pnemade, tagoh, tcallawa, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-22 21:23:16 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 Dimitrios Christidis 2015-11-04 15:42:35 UTC
Description of problem:
Beginning with Fedora 23, the OTF files for Computer Modern Unicode are included in texlive-cm-unicode. However, fontconfig is not configured to search the install location by default. Thus, the user is required to perform additional steps to use that font in TeX or other applications.


Version-Release number of selected component (if applicable):
fontconfig-2.11.94-4.fc23.x86_64
texlive-cm-unicode-svn19445.0.7.0-14.fc23.noarch


How reproducible:
Always


Steps to Reproduce:
1. dnf install texlive-cm-unicode
2. fc-list | grep CMU


Actual results:
fontconfig does not locate the recently installed fonts.


Expected results:
After installation, the fonts should be available for use without further actions.

Comment 1 Nicolas Mailhot 2015-11-04 17:31:50 UTC
The problem is in texlive, which is not following Fedora packaging guidelines. They would ensure its fonts are properly published in fontconfig, app install, etc

https://fedoraproject.org/wiki/Packaging:FontsPolicy

Comment 2 Dimitrios Christidis 2015-11-04 18:58:16 UTC
It seems that I was also mistaken on the date of addition; the OTF files have been present for quite some time. I never noticed because fontspec would not find the fonts automatically.

Am I using them in a wrong way? If so, this bug might be invalid.

Nevertheless, I think it would be useful to make those fonts available to all applications.

Comment 3 Nicolas Mailhot 2015-11-04 19:08:32 UTC
You're not using it the wrong way, it's texlive that installs its fonts for historical reasons in private locations no other software will look in.

It used to annoy everyone but TEX users. However nowadays TEX is migrating to text engines that look for fonts in the same places as everyone else (because TEX users want to use the nice unicode opentype fonts available in standard locations), so now TEX warts are hitting TEX users too.

The solution is to install TEX opentype fonts in standard locations fontconfig/rpm/etc look for them, as required by Fedora packaging guidelines.

Comment 4 Tom "spot" Callaway 2015-11-09 21:39:55 UTC
I'm worried that I'll break TeX (a much older and scarier system) by moving their fonts into unexpected locations, even if those locations are more reasonable for the rest of the world.

Would a good compromise be to make symlinks to the OTF font files in /usr/share/fonts/%{name} (%{_fontdir}) in the texlive packages?

Comment 5 Akira TAGOH 2015-11-10 02:42:50 UTC
That should works. but we need to do this change carefully so that this would means we'll see more fonts installed by default from POV of fontconfig. it may have a side-effect and gives different looks to users.

Comment 6 Nicolas Mailhot 2015-11-10 10:42:32 UTC
(In reply to Akira TAGOH from comment #5)
> That should works. but we need to do this change carefully so that this
> would means we'll see more fonts installed by default from POV of
> fontconfig. it may have a side-effect and gives different looks to users.

I don't see a good way to avoid the side effects except being careful with font aliasing. And the aliasing can not be adjusted before fonts are actually there.

But the fonts (at least all the otf and ttf ones) need to move to /usr/share/fonts/something since people (and apps) now expect this location, even though all of them have not realized yet what fontconfig is. All kind of apps poke in /usr/share/fonts directly nowadays without using system fontconfig. If you look at font questions on stackoverflow the standard answer now is to put fonts there, not to run xfs like people answered just a few years ago.

spot has the right transitional answer, though determining when to get rid of the compat symlinks is going to be tricky.

Comment 7 Akira TAGOH 2015-11-11 03:12:13 UTC
(In reply to Nicolas Mailhot from comment #6)
> I don't see a good way to avoid the side effects except being careful with
> font aliasing. And the aliasing can not be adjusted before fonts are
> actually there.

Right. well, was just a reminder to pay more attentions on this change.

> spot has the right transitional answer, though determining when to get rid
> of the compat symlinks is going to be tricky.

Indeed. ideally it would be good to move the fonts under /usr/share/fonts without symlinks. need to test it carefully anyway.

Comment 8 Dimitrios Christidis 2016-01-04 17:14:39 UTC
I noticed that the GFS and Linux Libertine fonts (and possibly others) have a separate package that installs the OTF files in /usr/share/fonts. Would this be a safer solution?

Comment 9 Nicolas Mailhot 2016-01-04 21:22:52 UTC
(In reply to Dimitrios Christidis from comment #8)
> I noticed that the GFS and Linux Libertine fonts (and possibly others) have
> a separate package that installs the OTF files in /usr/share/fonts. Would
> this be a safer solution?

The otf package for those fonts conforms to Fedora font packaging guidelines

Comment 10 Tom "spot" Callaway 2016-01-14 20:25:12 UTC
I'm going to commit the symlink changes into rawhide's texlive. If there are conflicts or mistakes, please test there and let me know. The following texlive subpackages are affected:

accanthis
almfixed
antt
asana-math
baskervaldx
berenisadf
cabin
ccicons
cm-unicode
comicneue
cyklop
dantelogo
drm
ebgaramond
erewhon
fandol
fbb
fdsymbol
fetamont
fira
fontawesome
gfsartemisia
gfsbaskerville
gfsbodoni
gfscomplutum
gfsdidot
gfsneohellenic
gfsporson
gfssolomos
gillius
gnu-freefont
heuristica
inconsolata
iwona
kurier
libertine
librebaskerville
librecaslon
lm
lm-math
lobster2
mdsymbol
mintspirit
mnsymbol
newpx
ocr-b-outline
oldstandard
phaistos
philokalia
playfair
poltawski
punknova
quattrocento
raleway
semaphor
skaknew
sourcecodepro
sourcesanspro
sourceserifpro
stix
tex-gyre
tex-gyre-math
umtypewriter
universalis
xcharter
xits

Comment 11 Tom "spot" Callaway 2016-01-22 21:23:16 UTC
This is now "fixed" in texlive-2015-21.20150728_r37987.fc24.