Thursday, December 30, 2010

How to remove custom fonts (user fonts) on Ubuntu

Update: 3 January 2011 / 28 Muharam 1432H, Is.

24 Muharam 1432H

After clicking the Install Font button, see Pic 1, and trying out a new font, it turns out that that new font isn't what i want on my list of fonts. But how does one remove it?

Pic 1 - The Install Font button. Easy to install, hardly know how to uninstall :p

Before removing the unwanted font, Pic 2:

Pic 2 - The unwanted font shown in Writer. Before removing.

After removing the unwanted font, Pic 3:

Pic 3 - The unwanted font shown in Writer. After removing.

Like any seasoned Windows user, i did go through the fonts file, see Pic 4, but couldn't find the font i want to delete. By the way, the file is located here:
File System > usr > share > fonts.

Pic 4 - Locating the fonts folder in Ubuntu.

So, i did some searching and found these to be helpful:
- How to remove installed fonts in Ubuntu
- How to Delete Ubuntu Fonts

Turns out that a font installed using the Install Font button is referred to as custom fonts or user fonts.

Here, i refined the explanations.

1. Run the Terminal. The Terminal, shown in Pic 6, is located here:
Panel > Applications > Accessories > Terminal. See Pic 5.

Pic 5 - Refer Step 1. Running the Terminal from the menu.

Pic 6 - The Terminal, freshly loaded.

2. Type in the command as follow:
cd /home/username/.fonts
Source: How to remove installed fonts in Ubuntu
Refer Pic 7.

Pic 7 - Refer Step 2. Changing directory to the fonts folder.

3. Change the part username in Step 2 to your username. Mine is aisha. See Pic 8.

In my case, it's:
cd /home/aisha/.fonts
Then press the Enter button. A new command line appears as shown in Pic 9.

Pic 8 - Refer Step 3. Changing the username in the command.

Pic 9 - Refer Step 3. We are now in the fonts folder.

4. To see the list of items in the fonts folder, type the command as follow:
Source: How to remove installed fonts in Ubuntu
Refer Pic 10. Then press the Enter button. A list of custom fonts appears, similar to Pic 11.

Pic 10 - Refer Step 4. Adding command to see the list of items in the fonts folder.

Pic 11 - Refer Step 4. List of user fonts installed in my laptop.

5. From the list, similar to as seen in Pic 11, look for the font(s) you want to remove. Then type in the the command as follow:
Source: How to remove installed fonts in Ubuntu
followed by the name of the font(s) you want to remove. The are two ways to add the font name:
  1. You can either type-in the name, or
  2. Highlight the name. Press Ctrl+Shift+C to copy. Then press Ctrl+Shift+V to paste.
Then press the Enter button.

In my case, i want to remove the Arabic Typesetting font. So, my command, as shown in Pic 12, will be like this:
rm arabtype.ttf

Pic 12 - Refer Step 5. Adding the command to remove the unwanted font(s).

6. Upon pressing the Enter button in Step 5, a new line to confirm the removal appears. Refer Pic 13.

To proceed with the removal, type in:
then press the Enter button, see Pic 14. Then command line seen in Pic 9 appears, also shown in Pic 15. The removal process is completed.

Pic 13 - Refer Step 6. Confirmation required.

Pic 14 - Refer Step 6. Removal confirmed.

Pic 15 - Refer Step 6. Unwanted font has been removed.

Wednesday, December 29, 2010

How to switch keyboard layout for different scripts

23 Muharam 1432H

After upgrading from Ubuntu 10.04 to Ubuntu 10.10, lots of things had to be customised to make my laptop feel homely and personal again -- the way it was before the upgrade; applications and plug-ins had to be re-installed, settings had to be adjusted, search for solutions for new problems, etc.

One of the customisation is the keyboard layout for different scripts. Mainly, i use the English script to write in English *of course*, or Rumi (modern Malay script). Sometimes i use the Arabic script in pictures or, for Jawi (old Malay script). Rarely do i use Mandarin. i did try Tamil *or was it Malayalam? Can't remember* a few times.

1. From the Panel > System > Preferences > Keyboard. See Pic 1.

Pic 1 - Refer Step 1.

2. In the Keyboard Preferences window, go to the Layouts tab, and click the Add... button. See Pic 2.

Pic 2 - Refer Step 2.

3. A new window titled Choose a Layout appears. Go to the By language tab. See Pic 3.

Pic 3 - Refer Step 3.

4. In the Language: list, scroll to the language of your choice.

Here, i chose Arabic. See Pic 4.

Pic 4 - Refer Step 4.

5. The choices under the Variants: list is different for each language.

If you already know what you're looking for, scroll to that option.

If you don't know what you're looking for, try out an option and see how the keyboard layout changes in the Preview: field. Choose what option suits you.

Here, i chose Arabic qwerty/digits. See Pic 5.

Pic 5 - Refer Step 5.

6. Then click the Add button, located on the lower-right corner of the Choose a Layout window.

Pic 6 - Refer Step 6.

7. Notice a shortcut appears on the upper Panel. Notice also in the Keyboard Preferences window that the Arabic qwerty/digits has been added to the list. See Pic 7.

Pic 7 - Refer Step 7.

8. Then click the Close button to close the Keyboard Preferences window. See Pic 8.

Later on, i unchecked the Separate layout for each window option. This is optional.

Pic 8 - Refer Step 8.

9. So, whenever you need to switch your keyboard layout to fit the script you want, simply click the keyboard icon in the Panel, then click the layout of your choice. See Pic 9.

Pic 9 - Refer Step 9.

In Ubuntu 10.04, the active keyboard layout is indicated with letters (such as USA for English US, or Ara for Arabic); however, this is not so in Ubuntu 10.10. See Pic 10.

Pic 10 - Comparing active keyboard indication.

You might want to look-up in the Synaptic Package Manager (Panel > System > Administration) for some Arabic fonts. Simply type arabic in the search field.

These are the Arabic fonts i use:
- Scheherazade
- mry_KacstQurn