Posts: 319
impuwat
Joined: 13 Sep 2007
#1
I've written a how-to for adding truetype fonts to antiX aimed at the beginning user. Before I post the how-to I would appreciate a little feedback regarding the following commands in terminal. I've used them successfully to add fonts but I'm wondering if any of these steps are unnecessary. Especially regarding the command fc-cache.

I know it creates a cache which enables applications that use fontconfig to load fonts more rapidly. Does antiX have applications that utilize fontconfig? Just striving for efficiency and trying to understand things a little better.

After moving the new font to the appropriate folder and navigating to it, I've been using the following commands
mkfontdir
fc-cache
xset +fp /usr/share/fonts/truetype/(font location)
xset fp rehash
Thanks for any advice.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#2
What I did was install ms true type fonts via synaptic, It bring them all. Then I use gtkfontsel to select the font and copy the correct line into the config file I want to edit. You can also use xfontsel.

The package is called msttcorefonts.
Posts: 319
impuwat
Joined: 13 Sep 2007
#3
hmmmm. There are thousands of varieties of truetype fonts. I'm assuming msttcorefonts brings in a lot of new fonts of the ms variety but certainly (or hopefully) not all possible truetype fonts. I've been using xset to import the desired font(s) into X11 and xfontsel to double check and make sure they were recognized. The method I'm detailing can be used to import and use any truetype font that might also be used by a win computer ( I think....so far has been working for me.)

Once they are installed and recognized I've used lxappearance to switch to the new font, or edited the fluxbox style to change the font there.

Does this make sense? Maybe I should just post my how-to so what I'm doing would be more evident and easier to critique.
Posts: 1,520
eriefisher
Joined: 07 Oct 2007
#4
One thing to simplify changing fonts and themes is to use gtk-chtheme from the repos. You can select installed themes and fonts. If you downloaded a font you like, place in /home/username/.fonts and it will find it.
Posts: 253
mariel77
Joined: 13 Sep 2007
#5
impuwat wrote:
fc-cache
xset +fp /usr/share/fonts/truetype/(font location)
xset fp rehash
I am not sure of the answer to your question because I only understand part of what your script does.

What I do know is that when I added fonts manually, I used fc-cache -fv after adding the fonts to folder or creating the folder. I don't know if that is of any use to you or not. I really appreciate you doing this; that was one of the things that had me stumped using antiX.[/b]
Posts: 319
impuwat
Joined: 13 Sep 2007
#6
In order to illustrate what I'm doing, and what I have so far, here is the how-to as I have it to this point. This should be a little clearer. Please jump in with any suggestions as you have been doing. I appreciate all your comments and hearing how everyone has been doing the same task...yet each differently. I need to add some additional information regarding lxappearance and how to incorporate the new font into antix (fluxbox themes & applications) but this is what I have so far.
---------------------------------------------------------------------------------------
How to add true type fonts to antiX

Adding a new font to antiX may be child's play to experienced users. For the rest of us adding a font is a good learning exercise. I will detail how I've added fonts to antiX in the hope of reducing the time spent searching for those who have yet to accomplish the task. As an"ever-learning'" linux newbie, I've been frustrated in the past by those who assume I know some intermediate step. Therefore I will endeavor to make this a simple step by step exercise. At first glance these steps seem a little lengthy, but a few minutes in the terminal will accomplish these steps. This process seems to work for any truetype font of the windows variety.

I would also appreciate feedback from my"elders" regarding any extraneous steps or mistakes I may have included. I will edit this brief"how to" based on those tips.

First download a suitable ttf (Truetype Font) you would like to try that complements the theme or style you are using. Many free font sites exist with ttf font varieties numbering in the thousands. For this example, we go to:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.1001freefonts.com/almagro.htm"
linktext was:"http://www.1001freefonts.com/almagro.htm"
====================================
and download the almagro font. After downloading we now have the file, almagro.zip.

Now we obviously need to unzip almagro.zip. Open a terminal and become root by typing,
su

Next type your password. You will not see your password while you are typing but it is there. When finished press Enter.

To unzip almagro.zip simply type....
unzip /home/(your username)/almagro.zip
in the terminal.

After unzipping we have the file almagro.ttf. Now we need to move almagro.ttf to the correct place. Truetype fonts accessible for all users of your antiX computer are stored in /usr/share/fonts/truetype . If you navigate to this directory you will notice there are several categories of fonts in the truetype directory. Adding another directory to help keep your fonts organized might be a prudent step. In this case, since Almagro is a font that appears to be handwritten, we will create a folder/directory in truetype that we can add similar fonts to in the future. We will create a directory called"handwriting" and add almagro.ttf to this file.

There are several ways of doing this but the quickest is with the terminal. We will use the terminal for most of this exercise so leave it open after each step. In the terminal enter....
mkdir /usr/share/fonts/truetype/handwriting
followed by:
mv almagro.ttf /usr/share/fonts/truetype/handwriting
Now we need to navigate to the handwriting directory. In terminal type.....
cd /usr/share/fonts/truetype/handwriting
Next we need to create the fonts.dir file. Again in terminal type...
mkfontdir
.

Next in terminal.....
fc-cache
This command creates a font information cache for fontconfig system, which enables applications that use fontconfig to load fonts more rapidly.

Next we need to add the font directory to the X11 font path. In terminal type....
xset +fp /usr/share/fonts/truetype/handwriting
Followed by.....
xset fp rehash
If you would like to make sure almagro has been added to the X11 font path you can start xfontsel to check. In the terminal simply type.....
xfontsel
After xfontsel opens you will see a horizontal list that begins at the left with,"-fndry-fmly-wght-slant ...." Click on"fmly" and you should see almagro listed.

The easiest way to switch to your new font is with lxappearance. To learn more go to...
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"antix.freeforu ms.org/need-help-with-rox-filer-t748.html?highlight=lxappearance"
linktext was:"antix.freeforu ms.org/need-help-w ... appearance"
====================================