Bug 1226831

Summary: /etc/fonts/fonts.conf claims it references local.conf but it does not
Product: [Fedora] Fedora Reporter: Jan Pazdziora <jpazdziora>
Component: fontconfigAssignee: Akira TAGOH <tagoh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: fonts-bugs, i18n-bugs, jpazdziora, pnemade, tagoh
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: 2015-06-02 08:15:38 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 Jan Pazdziora 2015-06-01 09:06:37 UTC
Description of problem:

Attempting to fix broken fonts in my terminal after upgrade to Fedora 22, I read various documentation about how fonts are supposed to be configured these days. One of the sources of wisdom are:

# head -22 /etc/fonts/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

<!--
	DO NOT EDIT THIS FILE.
	IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
	LOCAL CHANGES BELONG IN 'local.conf'.

	The intent of this standard configuration file is to be adequate for
	most environments.  If you have a reasonably normal environment and
	have found problems with this configuration, they are probably
	things that others will also want fixed.  Please submit any
	problems to the fontconfig bugzilla system located at fontconfig.org

	Note that the normal 'make install' procedure for fontconfig is to
	replace any existing fonts.conf file with the new version.  Place
	any local customizations in local.conf which this file references.

	Keith Packard
-->

However, there are no references to local.conf in fonts.conf beyond this initial documentation:

# grep local.conf /etc/fonts/fonts.conf
	LOCAL CHANGES BELONG IN 'local.conf'.
	any local customizations in local.conf which this file references.
#

Please fix this documentation/warning snippet to show valid configuration locations.

Version-Release number of selected component (if applicable):

# rpm -qf /etc/fonts/fonts.conf
fontconfig-2.11.93-2.fc22.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Attempt to configure fonts.
2. Read the documentation at the top of /etc/fonts/fonts.conf.
3. Place customization to /etc/fonts/local.conf.
4. Wonder why the changes are not reflected in any way.
5. Check if fonts.conf references local.conf like it promises to do.

Actual results:

It does not -- documentation and reality mismatch.

Expected results:

It does, or better yet -- the documentation at the top of the file points the user to /etc/fonts/conf.d or similar location that is actually referenced by <include ...> in /etc/fonts/fonts.conf.

Additional info:

Comment 1 Akira TAGOH 2015-06-02 08:15:38 UTC
No false alarm there. real code to read local.conf is in /etc/fonts/conf.d/51-local.conf and writing something in /etc/fonts/local.conf should takes effects.

I'm not sure what you did in your local.conf though, I guess something went wrong there.
just putting malformed config to see if fontconfig is really reading:

# cat /etc/fonts/local.conf 
<?xml version="1.0">
<fontconfig>
  <abc>
</fontconfig>
# fc-match
Fontconfig error: "local.conf", line 1: unclosed token
...

Comment 2 Jan Pazdziora 2015-06-02 08:29:17 UTC
Ah, you are right. Thank you for setting me straight and sorry for the false alarm.