Hello Thaths,
   This is what I did to get windows fonts to be detected by mozilla.
1. If you don't have a /usr/share/fonts/TrueType directory, create one.

    # mkdir /usr/share/fonts/TrueType
    # cd /usr/share/fonts/TrueType
2. Make sure that all the font files you're copying have lower-case
extensions, so if you have files like font.TTF, rename that to
font.ttf
3. Copy the fonts to /usr/share/fonts/TrueType
4. Change into that directory:

    # copy /mnt/C:\/windows/fonts/*.ttf /usr/share/fonts/TrueType/.
   # cd /usr/share/fonts/TrueType

5. Issue the following commands to build the necessary fonts.scale and
fonts.dir:
    # ttmkfdir -o fonts.scale
    # mkfontdir
6. This should have now created the fonts.scale and fonts.dir files
7. Now go to you /etc/X11 directory so that you can add the new font
directory to the search path of your X server by adding it to the
fonts section of XF86Config

8. Edit XF86Config - Go to the "Files" section and add the FontPath
there, mine looks like the following after editing:

    RgbPath "/usr/X11R6/lib/X11/rgb"
    FontPath "unix/:7100"
    FontPath "/usr/share/fonts/TrueType"

9. Now for the Mozilla part! Go to the directory you installed Mozilla
in, located at /usr/local/mozilla. Change into
/usr/lib/mozilla-1.4/defaults/pref. Note your mozilla may be installed
somewhere else. In redhat, try
    # rpm -ql mozilla grep unix.js
to get the path where your unix.js file resides.
10. Backup the unix.js preference file so that you can get back to it
if anything screws up:
# cp unix.js unix.js.bak
12. Edit the unix.js file and look for the TrueType section and change
it to look like the following snippet:

    // TrueType
    pref("font.FreeType2.enable", true);
    pref("font.freetype2.shared-library", "libfreetype.so.6");
    // if  libfreetype was built without hinting compiled in
    // it is best to leave  hinting off
    pref("font.FreeType2.autohinted", false);
    pref("font.FreeType2.unhinted", false);
    // below a certian pixel size anti-aliased fonts produce poor results
    pref("font.antialias.min", ;
    pref("font.embedded_bitmaps.max", 1000000);
    pref("font.scale.tt_bitmap.dark_text.min", 0);
    pref("font.scale.tt_bitmap.dark_text.gain", "0.7");
    // sample prefs for
    TrueType font dirs
    pref("font.directory.truetype.1",  "/usr/share/fonts/TrueType");
    pref("font.directory.truetype.2", "/usr/X11R6/lib/X11/fonts/TTF");
    //pref("font.directory.truetype.3", "/u/sam/tt_font3");
    pref("font.FreeType2.printing", true);

That should get mozilla to detect the fonts for you.

PS: I did this a long time back. And I was using RedHat. But I had
written these steps in a file which I have shown above. Please let me
know if you got it right.

Regards
Ravi

On 9/27/05, Thaths <[EMAIL PROTECTED]> wrote:
> I am running a Debian etch machine (currently, testing). I would like
> to install a ttf font that I like on this machine and get Mozilla and
> gimp to see this font. How do I go about doing this? My X is using xfs
> for its fonts. I think I need to make xfs aware of the new font. It
> looks like defoma is used to manage the fonts. But I am unable to find
> out how I use defoma with this ttf font.
>
> Thaths
> --
> "Facts are meaningless. You could use facts to prove anything that's even
>                        remotely true!"  -- Homer J. Simpson
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> linux-india-help mailing list
> linux-india-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-india-help
>


--
----------------------
I hear and I forget, I see and I remember, I DO and I understand.
-Confucius-


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
linux-india-help mailing list
linux-india-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to