Install fonts?

Please post all general support questions for LXDE here.
Locked
LanceHaverkamp
Posts: 18
Joined: Wed Apr 22, 2009 12:48 am

Install fonts?

Post by LanceHaverkamp »

How do you install fonts?
Right or left clicking fonts does nothing.
I can't be the first to ask this, but I see nothing in either the wiki nor the forums???

Thanks,
Lance
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: Install fonts?

Post by Marty Jack »

You put the font files in an appropriate font directory that you locate with xset q, then you run fc-cache in that directory, then you xset fp rehash

You haven't said what your font source is, but if you have a tar file, untar it into a temporary directory and see what files you've got that have the appropriate extensions
LanceHaverkamp
Posts: 18
Joined: Wed Apr 22, 2009 12:48 am

Re: Install fonts?

Post by LanceHaverkamp »

Thanks for the quick & friendly reply!
I've been installing fonts in Linux (mostly KDE) for 8+ years with no problem other than the occasional poorly made font.
I have absolutely no idea what those instructions mean; "with xset q, then you run fc-cache in that directory, then you xset fp rehash" might as well be a foreign language. Nothing against you, you're being very helpful--and I appreciate it!

But to those running LXDE: I'd love to keep using LXDE. KDE4 is hopelessly defective & lots of us don't like gnome. But when an 8+ years experienced Linux end-user can't do all the regular things end-users need to do like:
  • Install a font
    Set a program to autostart
    Adjust the network settings
    Edit the menu
    Etc.
Without constantly having to learn how to hack yet-another config file, or re-compile something; new Linux users have no chance whatsoever.

Most of these could be fixed without more applets. A simple right-click script could easily send menu entries to the autostart folder--for example. Font installation can probably be scripted for right clicking a .ttf file as well. I don't code, as I said I'm an end user--and I really like the idea of LXDE, but I'll have to check back in a year or so to see if LXDE is end-user ready.

Best wishes,

Lance
mattphelps
Posts: 1
Joined: Sun Dec 12, 2010 6:04 pm

Re: Install fonts?

Post by mattphelps »

Here's how:

The easiest way to open up a zip archive is to click on it. If you use KDE, the file will open in the Ark archive manager. There might be several files listed in the archive; we are interested only in the ones with the .ttf or .otf extensions -- for TrueType and OpenType fonts, respectively. Click on the font file to preview it.
When you open a font inside a zip archive, Ark will complain and ask if you want to view the file with an external program. Click on the View Externally button to view the font. If your fonts are not in a zip archive, simply click on them to open them in the Font Viewer.
The Font Viewer displays your font in several different sizes, so you can get a good idea of what it will look like. To install the font, click the Install button in the lower-right corner. If you can't see the install button, resize the window and it will appear.
After clicking the Install button, the Font Viewer asks where you want the font installed. Choose the Personal option if you just want the font installed for you as a user only. Choose the System option if you want all users on your computer to have access to the font. In order to install the font using the System option, you need to be the Administrator on your computer. On my home system, there is only one login that everyone uses, so for me either choice works equally as well.
After installing the font, the Font Viewer lets you know it was successfully installed. That's all there is to it -- really. Your font is now installed and ready to use. It's easy.
This process works well for the occasional font install, but installing fonts one at a time like this can become tedious in a hurry -- especially if you have a lot of fonts like I do. A quicker way is simply to put all your fonts into the correct location at the same time.
If the fonts are in zip archives, the first step is to get them out of there using Ark. When I was installing all of my fonts, I first collected them all into a folder I created on my Desktop called my_fonts. Once all of your fonts are unpacked and ready to install, the big question is, where do they go?
The answer is, it depends. There are two places you can put fonts. This goes back to the question that the Font Viewer application asks when it is installing fonts. Where you put them depends on whether you want only your login to be able to see and use the fonts or whether you want everyone on the system to be able to see and use the fonts.
If you want only your login to see them, put them into a folder in your home directory called .fonts. You probably have never seen this folder -- that is because of the dot (the .) at the beginning of its name. This makes a file or folder invisible on Linux.
To see this folder, and all other invisible files and folders in your home directory, go to the System menu and choose Home Folder. After that window opens, go to the View menu and click Show Hidden Files. The first time I did this, I was surprised by how many files there actually were in my supposedly empty home folder.
If the .fonts folder exists, you should now be able to see it. If you still cannot see it, you can create it. To create the folder, go to the Edit menu and choose Create New..., and then Folder. Be sure to name it .fonts, and then click the OK button.
Open the .fonts folder, and drag and drop your fonts into it. After they are copied over, KDE generates nice thumbnails so you can identify the fonts easily. When you next launch your word processor or other program, your newly installed fonts will be waiting for you.
If you want to install the fonts for everyone, the folder you should put them is /usr/local/share/fonts/. You can get there by clicking on the System menu and then your hard drive. There you will see a bunch of folders with names like tmp, var and usr. Open the usr folder, then local, then share and finally, the fonts folder. However, when you then try to put your fonts there, the window probably will report that you don't have permission to write to the folder.
To grant your self the permission to put items into the /usr/local/share/fonts/ folder, you need to be part of the staff group. To add yourself to this group, you need to be the Administrator on your computer or get the Administrator to do it for you.
Go to the K menu, and choose System Settings. Then, in the System Administration section, choose Users & Groups. In that window, in the bottom right is a button called Administrator Mode...; click it and enter your password. If successful, the window now will have a red outline, which is KDE's way of telling you that you are in administrator mode.
Now, select your login name and click the Modify... button, and the User Account window opens. Now click the Select... button on the Secondary Groups: line. In the Available Groups column, scroll down and highlight staff, and then click the Add button. Click OK in that window, the OK button on the User Account window and lastly the Close button on the Users & Groups window, and you are almost done.
Log out and then log back in to activate the new settings. Now when you navigate to the folder, you will be able to copy files into it. Drag your fonts into the folder, and everyone will be able to see and use them.
loin
Posts: 3
Joined: Wed Dec 22, 2010 1:01 am

Re: Install fonts?

Post by loin »

make a directory under /usr/share/fonts
copy them to /usr/share/fonts/font-path
mkfontscale
mkfontdir
fc-cache
Locked