Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41204 - Truetype fonts (in /usr/X11R6/lib/X11/fonts/truetype) are not configured in fontconfig package
Summary: Truetype fonts (in /usr/X11R6/lib/X11/fonts/truetype) are not configured in f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-10 22:48 UTC by hodak
Modified: 2004-07-19 05:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hodak 2004-02-10 22:48:39 UTC
When emerging xfree with truetype USE flag on, MS fonts are installed into /usr/X11R6/lib/X11/fonts/truetype. However, this directory is not set in /etc/fonts/fonts.conf or local.conf by default. As the result, some applications (such as Firebird) do not these fonts even though truetype fonts would be better.
Recording the font directory into  /etc/fonts/local.conf makes the Firebird fonts nicer and Abiword can finally see MS fonts.

This issue is fixed for me now, but I reporting this in hope that the directory could be setup automatically when installing xfree (or fontconfig) with truetype USE flag on. 
This can be done in ebuild, rigth? Or is ther some problem I am not aware of?

I found out about this problem when I out of couriosity emerged corefonts and found that Firebirds fonts have improved. More in the forums:
http://forums.gentoo.org/viewtopic.php?t=135113&highlight=

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-11 21:43:35 UTC
spanky, FYI everybody in xfree is in fonts, fonts just has additional people.
Comment 2 foser (RETIRED) gentoo-dev 2004-02-12 06:53:31 UTC
@reporter : Did this happen on a clean (new) install ?
Comment 3 hodak 2004-02-12 12:36:13 UTC
Well, I install Gentoo in mid-November. Within a few days after the install I realized that abiword cannot see MS fonts. Then I found out that MS fonts are in corefonts package, so I installed it (added path to xfs config file), and abiword  was able to use MS and also Firebird fonts (I always use default setup for Firebird) got better. Then I realized that MS fonts are already installed when using truetype USE flag, but still unmerging corefonts package made a difference on my system. So I have been wondering for some time why the MS fonts that come with xfree are not properly set up, and I just recently found the answer when posting to the forums (see link in my original post).

So, my install is not fresh, but it is not old either. My system is up-to-date  stable. As for as font configuration, I only touched xfs config file (to add more paths) and /etc/fonts/local.conf (this is after adding truetype font path):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>

<!-- Font directory list configured on  -->

        <dir>/usr/X11R6/lib/X11/fonts/truetype</dir>


<!--
  Enable sub-pixel rendering
        <match target="font">
                <edit name="rgba" mode="assign"><const>rgb</const></edit>
        </match>
-->
<match target="font">
    <edit name="autohint" mode="assign"><bool>true</bool></edit>
    </match>
    <match target="font">
        <edit name="rgba" mode="assign"><const>none</const></edit>
        </match>
</fontconfig>

I did not  change /etc/fonts/fonts.conf, but the file does not contain path to truetype fonts. Here is a part that defines fonts directories

  <!-- Font directory list configured on  -->

        <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>

        <dir>/usr/share/fonts</dir>
        <dir>/usr/local/share/fonts</dir>
        <dir>/usr/X11R6/lib/X11/fonts/75dpi</dir>
        <dir>/usr/X11R6/lib/X11/fonts/100dpi</dir>
        <dir>~/.fonts</dir>

Notice that truetype is missing. After adding truetype path into local.conf Firebird uses nicer fonts than before. So, once again, unless I am not mistaken, it should be a good idea to automatically add truetype font path into  /etc/fonts/fonts.conf (or local.conf) when truetype USE flag is set up.
Comment 4 Andy Crook 2004-05-03 11:31:39 UTC
As far as I understand the problem is in the /etc/init.d/xfs startup script.
It doesn't involve correctly fontconfig to recreate font cache after xfs's config file changed or during first start of xfs.

I've just noticed it during new install of 2004.1
Config files in /etc/fonts were created during emerge of fontconfg and didn't change after first start of xfs
The file /usr/X11R6/lib/X11/fonts/truetype/fonts.cache-1 wasn't created too.
Only re-emerging fontconfig gave me correct config files because buldscript did it.
Comment 5 Andy Crook 2004-05-04 11:31:30 UTC
OK
I've looked throug the process of installation of xfree86 and now everything is clear for me.

So the problem is:
1. During installation of xfree86 fontconfig is installed prior to MS truetype fonts
2. Files in /etc/fonts are generated only by "configure" script of the fontconfig package during it's installation.
So if we don't have directory "/usr/X11R6/lib/X11/fonts/truetype" (and we haven't due to installation sequence) then it won't appear in /etc/fonts/fonts.conf
and, therefor font cache won't be created in this directory durinf xfs start

So we have to:
1. As the temporary solution - change the sequence of package installation by chengin their dependencies so MS TTF's will be installed prior to fontconfig

but I think the best way is:
2. Change /etc/init.d/xfs script so it first will update files in /etc/fonts according to changes in /etc/X11/fs/config and then run cache update (fc-cache)
Comment 6 foser (RETIRED) gentoo-dev 2004-06-02 05:11:13 UTC
but fontconfig is needed by xfree/xorg-x11 and making it depend on a fontpack is wrong i think.

But this isn't really a problem anymore with the move to /usr/share/fonts (which is probably half the cause), so I think this problem got fixed as it is.
Comment 7 hodak 2004-06-03 02:27:34 UTC
Can elaborate more on this? What is moving to /usr/share/fonts? How  does this move affects the problem?

Thanks
Comment 8 foser (RETIRED) gentoo-dev 2004-06-03 03:11:01 UTC
the system fonts aren't in the /usr/X11R6 location anymore (in recent xservers) & moved to /usr/share/fonts . That is a default path in fonts.conf (not detected iirc) & that makes this problem go away.
Comment 9 hodak 2004-07-19 00:10:26 UTC
Since xorg is stable now and the corefonts package installs fonts into /usr/share/fonts/corefonts/ I think that this bug can be closed.
Comment 10 foser (RETIRED) gentoo-dev 2004-07-19 05:29:55 UTC
agreed, closing