Directories scanned by fc-cache - Slackware

This is a discussion on Directories scanned by fc-cache - Slackware ; Hi, How do I (re)define the list of directories scanned by fc-cache -f? I have the following problem: I want to add Bitstream Vera Fonts, so Google Earth can find and use them. When I simply copy over the fonts ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Directories scanned by fc-cache

  1. Directories scanned by fc-cache

    Hi,

    How do I (re)define the list of directories scanned by fc-cache -f?

    I have the following problem: I want to add Bitstream Vera Fonts, so
    Google Earth can find and use them.

    When I simply copy over the fonts (Vera*.ttf files) in /usr/share/fonts/
    TTF/ and run fc-cache -f, fonts are added OK to the system. I can check
    that by opening Openoffice.org, and there they are. Except Google Earth
    doesn't find them! Must be looking for a bitstream-something directory
    in /usr/share/fonts. I checked this on a working CentOS 5.0 install,
    where the bitstream fonts are all in /usr/share/fonts/bitstream-vera/,
    and Google Earth starts without complaining and uses them correctly.

    But when I create the /usr/share/fonts/bitstream-vera/ directory and put
    my Vera*.ttf fonts in it, fc-cache -f ignores the directory.

    What can I do to tell fc-cache to scan it?

    cheers,

    Niki

  2. Re: Directories scanned by fc-cache

    On Thu, 11 Oct 2007 09:22:32 +0000, Niki Kovacs wrote:

    > Hi,
    >
    > How do I (re)define the list of directories scanned by fc-cache -f?
    >
    > I have the following problem: I want to add Bitstream Vera Fonts, so
    > Google Earth can find and use them.
    >
    > When I simply copy over the fonts (Vera*.ttf files) in /usr/share/fonts/
    > TTF/ and run fc-cache -f, fonts are added OK to the system. I can check
    > that by opening Openoffice.org, and there they are. Except Google Earth
    > doesn't find them! Must be looking for a bitstream-something directory
    > in /usr/share/fonts. I checked this on a working CentOS 5.0 install,
    > where the bitstream fonts are all in /usr/share/fonts/bitstream-vera/,
    > and Google Earth starts without complaining and uses them correctly.
    >
    > But when I create the /usr/share/fonts/bitstream-vera/ directory and put
    > my Vera*.ttf fonts in it, fc-cache -f ignores the directory.
    >
    > What can I do to tell fc-cache to scan it?
    >
    > cheers,
    >
    > Niki



    I run GE and do not have this problem so I am not sure why it does not
    work for you. You CAN try:

    add your new directory to xorg.conf

    Section "Files"
    RgbPath "/usr/X11/lib/X11/rgb"
    ModulePath "/usr/X11/lib/xorg/modules"
    FontPath "/usr/X11/lib/X11/fonts/local/"
    FontPath "/usr/X11/lib/X11/fonts/misc/"
    FontPath "/usr/X11/lib/X11/fonts/75dpi/:unscaled"
    FontPath "/usr/X11/lib/X11/fonts/100dpi/:unscaled"
    FontPath "/usr/X11/lib/X11/fonts/Type1/"
    FontPath "/usr/X11/lib/X11/fonts/OTF/"
    FontPath "/usr/X11/lib/X11/fonts/TTF/"
    FontPath "/usr/X11/lib/X11/fonts/CID/"
    FontPath "/usr/X11/lib/X11/fonts/Speedo/"
    FontPath "/usr/X11/lib/X11/fonts/75dpi/"
    FontPath "/usr/X11/lib/X11/fonts/100dpi/"
    FontPath "/usr/X11/lib/X11/fonts/cyrillic/"

    May also want to run mkfontscale.

    --
    Peter

  3. Re: Directories scanned by fc-cache

    Niki Kovacs wrote:
    > How do I (re)define the list of directories scanned by fc-cache -f?


    man fc-cache, man fonts.conf (especially the latter).

    on my slackintosh install, the relevant config file is /etc/fonts/fonts.conf.

    > I have the following problem: I want to add Bitstream Vera Fonts, so
    > Google Earth can find and use them.


    one of the things the man pages above will tell you, is that fc-cache only
    works for programs that make use of the fontconfig library. i don't know if
    google earth does or not, but if not, you can fiddle about with fc-cache as
    long as you like, you're not gonna get google earth to find your
    fonts. instead, you probably need to use the old mkfontdir/mkfontscale
    approach.

    > When I simply copy over the fonts (Vera*.ttf files) in /usr/share/fonts/
    > TTF/ and run fc-cache -f, fonts are added OK to the system. I can check
    > that by opening Openoffice.org, and there they are. Except Google Earth
    > doesn't find them! Must be looking for a bitstream-something directory
    > in /usr/share/fonts.


    my guess is that if google earth uses fontconfig, it doesn't care where the
    fonts are. it just asks fontconfig.

    > I checked this on a working CentOS 5.0 install,
    > where the bitstream fonts are all in /usr/share/fonts/bitstream-vera/,
    > and Google Earth starts without complaining and uses them correctly.


    which, however, doesn't mean that they *must* be in that directory for
    google earth to find them. perhaps the CentOS/RedHat people just preferred
    them there.

    HTH

    --
    Joost Kremers joostkremers@yahoo.com
    Selbst in die Unterwelt dringt durch Spalten Licht
    EN:SiS(9)

  4. Re: Directories scanned by fc-cache

    On Thu, 11 Oct 2007 09:22:32 +0000, Niki Kovacs wrote:

    > Hi,
    >
    > How do I (re)define the list of directories scanned by fc-cache -f?
    >
    > I have the following problem: I want to add Bitstream Vera Fonts, so
    > Google Earth can find and use them.
    >
    > When I simply copy over the fonts (Vera*.ttf files) in /usr/share/fonts/
    > TTF/ and run fc-cache -f, fonts are added OK to the system. I can check
    > that by opening Openoffice.org, and there they are. Except Google Earth
    > doesn't find them! Must be looking for a bitstream-something directory
    > in /usr/share/fonts. I checked this on a working CentOS 5.0 install,
    > where the bitstream fonts are all in /usr/share/fonts/bitstream-vera/,
    > and Google Earth starts without complaining and uses them correctly.
    >
    > But when I create the /usr/share/fonts/bitstream-vera/ directory and put
    > my Vera*.ttf fonts in it, fc-cache -f ignores the directory.
    >
    > What can I do to tell fc-cache to scan it?
    >
    > cheers,
    >
    > Niki


    I get the same message and, since I have yet to find anything that did not
    work due to lack of fonts, my "solution" was to check the box that says
    "don't show this message again".

    I suspect that some font substitution is going on in the background. I
    also suspect that the creators of GoogleEarth know this and put that check
    box there for that very reason.

    Have you found anything that does not work due to missing Bit Stream Vera
    fonts? If not, how do you know they are not being used despite
    GoogleEarth telling you otherwise?

    If everything else can find the font after you install it correctly, maybe
    it's GoogleEarth that needs fixing and not fc-cache.

    Steve


  5. Re: Directories scanned by fc-cache

    Niki Kovacs wrote:
    > When I simply copy over the fonts (Vera*.ttf files) in /usr/share/fonts/
    > TTF/ and run fc-cache -f, fonts are added OK to the system. I can check
    > that by opening Openoffice.org, and there they are. Except Google Earth
    > doesn't find them! Must be looking for a bitstream-something directory
    > in /usr/share/fonts. I checked this on a working CentOS 5.0 install,
    > where the bitstream fonts are all in /usr/share/fonts/bitstream-vera/,
    > and Google Earth starts without complaining and uses them correctly.

    Did you run mkfontscale and mkfontdir in the TTF directory?

    The Bitstream Vera files on my system are /usr/share/fonts/TTF
    (Vera.ttf VeraBd.ttf VeraMoBI.ttf VeraMoIt.ttf VeraSe.ttf
    VeraBI.ttf VeraIt.ttf VeraMoBd.ttf VeraMono.ttf VeraSeBd.ttf);
    copied them into the directory, ran mkfontscale then mkfontdir and
    Google Earth is a happy camper.

    If you cd /usr/share/fonts, you can fc-cache -f TTF which will update
    the cache files (or you could fc-cache -f /usr/share/fonts/TTF and
    accomplish the same thing). You do not need to edit any cache files
    manually.

    Hope this helps.

  6. Re: Directories scanned by fc-cache

    Franklin wrote:
    [google earth]
    > I suspect that some font substitution is going on in the background.


    yes, definitely. IIRC the full messages says something like "can't find
    bitstream vera, so we'll use whatever we find on your system. you may find
    text doesn't look right"

    my guess is that they hard-coded the width/height for (some of) the widgets
    to fit just the size of the text they want to display. if the program then
    needs to use another font, which might be wider or higher, it may happen
    that some text is cut off, or runs past the widget.

    > Have you found anything that does not work due to missing Bit Stream Vera
    > fonts? If not, how do you know they are not being used despite
    > GoogleEarth telling you otherwise?


    well, i think it's safe to say that if google earth tells you it can't find
    them, then it really can't find them... ;-)

    > If everything else can find the font after you install it correctly, maybe
    > it's GoogleEarth that needs fixing and not fc-cache.


    there are, however, different font-finding mechanisms. fc-cache belongs to
    fontconfig, which is sorta taking over the world (well, linux at least),
    but there's also the X font server.


    --
    Joost Kremers joostkremers@yahoo.com
    Selbst in die Unterwelt dringt durch Spalten Licht
    EN:SiS(9)

  7. Re: Directories scanned by fc-cache

    Le Thu, 11 Oct 2007 10:56:25 +0000, Thomas Ronayne a √©crit¬*:

    > Niki Kovacs wrote:
    >> When I simply copy over the fonts (Vera*.ttf files) in
    >> /usr/share/fonts/ TTF/ and run fc-cache -f, fonts are added OK to the
    >> system. I can check that by opening Openoffice.org, and there they are.
    >> Except Google Earth doesn't find them! Must be looking for a
    >> bitstream-something directory in /usr/share/fonts. I checked this on a
    >> working CentOS 5.0 install, where the bitstream fonts are all in
    >> /usr/share/fonts/bitstream-vera/, and Google Earth starts without
    >> complaining and uses them correctly.

    > Did you run mkfontscale and mkfontdir in the TTF directory?
    >
    > The Bitstream Vera files on my system are /usr/share/fonts/TTF (Vera.ttf
    > VeraBd.ttf VeraMoBI.ttf VeraMoIt.ttf VeraSe.ttf VeraBI.ttf
    > VeraIt.ttf VeraMoBd.ttf VeraMono.ttf VeraSeBd.ttf); copied them into
    > the directory, ran mkfontscale then mkfontdir and Google Earth is a
    > happy camper.


    Thanks for the hint! Running mkfontdir and mkfontscale did the trick!

    cheers,

    Niki

+ Reply to Thread