Installing true type fonts for linux

While searching the ways of installing true type fonts to linux, I get all sort of solutions. Some will ask you to copy and paste to fonts:/// folders in nautilus, or fonts:/ in konqueror. Some may even ask you to copy your ttf fonts to /usr/share/fonts and run fc-cache. All sort of ways doesn’t works so well during last two years.

Nowadays, I think all sort of ways may works under particular linux distro, the steps to install font might vary between different linux distros, but its they a common way that it will works for any distro? For me, installing custom fonts should be as straight forward as ‘copy and paste’ ttf files to a specific folders without needing to run any command or configuration script.

Recently, I find the ‘copy and paste’ way. I just need to copy my downloaded ttf font files to ~/.fonts. If your home directory does not contain .fonts folder, create a new one

For examples, I download a font from a site, it consist of multiple ttf files.

Readme.txt
SF New Republic Bold Italic.ttf
SF New Republic Bold.ttf
SF New Republic Italic.ttf
SF New Republic Sample.jpg
SF New Republic SC Bold Italic.ttf
SF New Republic SC Bold.ttf
SF New Republic SC Italic.ttf
SF New Republic SC.ttf
SF New Republic.ttf

I create a new folder “SF New Republic” in ~/.fonts , and copy all these files into that folder. Next I open oowriter ( open office writer), straight away I can use the font without doing fc-cache or any configurations.

Anyway, there is a command to verify fonts have successfully installed to your system:

fc-list | grep "SF"
SF New Republic:style=Regular
SF New Republic:style=Bold
SF New Republic:style=Bold Italic
SF New Republic SC:style=Bold
SF New Republic SC:style=Italic
SF New Republic SC:style=Regular
SF New Republic SC:style=Bold Italic
SF New Republic:style=Italic

fc-list is actually listing all the installed fonts, with pipe over grep, we can verified whether are those fonts successfully installed.

I have tested this method on:
1. Ubuntu Hardy Heron 8.04
2. Fedora 8

I would like to do a survey at here, if you are running different distro listed above, can you try out this method?

p.s. You can download fonts at http://www.dafont.com

From : linuxbyexample

Đăng nhập quyền root.
Tạo thư mục:

Code:
# mkdir /usr/share/fonts/truetype

Copy các file ttf vào thư mục vừa tạo. (Giả sử bạn có các file font nằm trong thư mục /home/redpenguin/font/

Code:
# cd /usr/share/fonts/truetype
# cp /home/redpenguin/font/*.ttf ./

Tạo index cho các scalable fonts vừa mới copy vào thư mục truetype.

Code:
# mkfontscale && mkfontdir

Lệnh trên tạo 2 file fonts.scale and fonts.dir. Cập nhật font cache.

Code:
# fc-cache -fv

Finished, bạn bật Open Office lên là có thể sử dụng các loại font arial hoặc time news roman rồi đó

From : hocit.com

Advertisements

Installing Ubuntu 8.04 LTS – Hardy Heron step-by-step installation guide with screenshots.

So you’ve heard about Ubuntu everywhere on the Internet and you’ve decided to install it on your computer (just to see if what you heard about it is true or not) and you don’t know how to do it?

Look no further! This guide will make things very simple for you, as it will teach you, step-by-step, how to install the latest version of Ubuntu operating system (current version is 8.04 LTS codename Hardy Heron) on your PC in no more than 10 minutes (depending on your computer specs, of course). Are you ready? Let’s start!

Step 1 – Download the Ubuntu 8.04 Desktop ISO image, that corresponds to your hardware architecture (i386 or amd64), from here.

Step 2 – Burn the ISO image with your favorite CD/DVD burning application (on Windows, you can use one of the following applications: Nero, CDBurnerXP, Roxio etc) on a blank CD at 8x speed.

Step 3 – Insert or leave the CD in your CD/DVD-ROM device and reboot your computer. Select your language when asked:

Review image

Then select the second option “Install Ubuntu” and hit Enter:

Review image

Step 4 – Wait for the CD to load into RAM, and when the installer appears, select your native language and click the ‘Forward’ button:

Review image
Review image

Where are you?

The second screen will feature a map of the Earth with little red dots, so you can select your city/country. Upon the current selection of your location, the time for the final system will adjust accordingly. You can also select your current location from the drop down list situated at the bottom of the window. Click the ‘Forward’ button after you have selected your desired location.

Review image

Test your keyboard

On the third screen, you will be asked to select the keyboard layout that suits you best (default is U.S. English). You can also test your keyboard on the little text input field situated at the bottom of the window. Click the ‘Forward’ button when you have finished with the keyboard configuration.

Review image

Hard disk partitioning

Hold on, don’t leave just yet! The hard disk partitioning is an easy task, so I am quite sure you will manage to handle it too. You have three options:

Review image

1. If you want to keep your existing operating system (e.g. Dual boot with Windows XP), select the first option: “Guided – resize the partition and use the freed space”.
2. If you want to delete your existing operating system and you want to let the installer to automatically partition the hard drive for you, select the second option: “Guided – use entire disk”.
3. Manual is the third choice at this point and I strongly suggest you to use it if you don’t have any other operating system installed and your hard drive does not contain important data on it. Follow the instructions below:

Choose the hard drive partition (or entire hard drive if you don’t have any partitions) you want to format and click the ‘Delete partition’ button to delete the selected partitions. In the end, you should have a single entry called “free space”, select it and click the ‘New partition’ button to create the ‘root’ partition. Select “Primary” for the partition type, set the size of the partition (in megabytes), leave the “Location for the new partition” and “Use as” options as they are and select the mount point “/” (just like in the image below).

Review image

You should still have a “free space” line, select it and click the ‘New partition’ button to create the ‘home’ partition. Select “Logical” for the partition type, set the size of the partition (in megabytes), leave the “Location for the new partition” and “Use as” options as they are and select the mount point “/home” (just like in the image below).

Review image

You should still have some “free space” left, so select it and click the ‘New partition’ button to create the ‘swap’ partition. Select “Logical” for the partition type, set the size of the partition (in megabytes) twice your RAM (e.g. if you have 512 RAM, set the size to 1024), leave the “Location for the new partition” option as it is and set the “Use as” option to ‘swap’.

WARNING: Be aware that all the data on the selected hard drive will be ERASED and IRRECOVERABLE!

Click the ‘Forward’ button to continue with the installation.

Who are you?

Here you must do exactly what the title of this step tells you to do. You must fill in a couple of fields with your real name, the name you want to use to log in on your Ubuntu OS (username), password and the name of the computer (automatically generated). Once you have finished with this step, click the Forward button again (for the last time).

Review image

Are you really ready for Ubuntu?

If you have successfully arrived at this point, then you are definitely ready for your new Ubuntu operating system. So, what are you waiting for? Click the ‘Install’ button NOW!

Review image
Review image

The Ubuntu 8.04 (Hardy Heron) operating system will be installed…

Review image

Step 5 – After approximately 8 to 10 minutes, a pop-up window will appear, notifying you that the installation is complete and you need to restart the computer in order to use the newly installed Ubuntu:

Review image
Review image
Review image

You’ve probably clicked the ‘Restart now’ button, because you were very excited to see your new Ubuntu operating system at work. Well then, have fun using it!

By: Marius Nestor, Linux Editor

Installing Linux Ubuntu as a Windows Application with Wubi

With the latest release of the popular Linux-based operating system, Ubuntu Hardy Heron, the installation process just got easier for Windows users who wish to try out an alternative to Vista or XP.  Even .NET developers who are looking out on trying the Mono project (the .NET platform for Linux-based operating systems) can benefit from it.  All this is possible thanks to a little Windows utility called Wubi, which is an installer for Ubuntu.

As described by Wikipedia’s definition on the tool:

Wubi adds an entry to the Windows boot menu which allows you to run Linux. Ubuntu is installed within a file in the Windows file system (c:\wubi\disks\system.virtual.disk), as opposed to being installed within its own partition. This file is seen by Linux as a real hard disk.

According to Wubi’s official site, Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click.  Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way.

The beauty of Wubi is that:

  • You don’t need to burn a CD. Just run the installer, enter a password for the new account, and click “Install”, go grab a coffee, and when your are back, Ubuntu will be ready for you.
  • You keep Windows as it is, Wubi only adds an extra option to boot into Ubuntu. Wubi does not require you to modify the partitions of your PC, or to use a different bootloader, and does not install special drivers. It works just like any other application. Wubi is spyware and malware free, and being open source, anyone can verify that.
  • Wubi keeps most of the files in one folder, and if you do not like it, you can simply uninstall it as any other application.
  • It’s free!

The following screenshot, which was taken from Wubi’s official site, shows you how easy it is to configure Ubuntu’s installation as a Windows application.

Remember that you don’t have to create a new partition to install Ubuntu with Wubi.  In fact, it will install the Linux-based operating system in the same partition that Windows is installed (just like a standard application).  You can choose whether to boot in Windows or Ubuntu whenever you reboot your computer.

There are some things to consider with this installation model:

  1. The performance is identical to a standard installation, except for hard-disk access which is slightly slower than an installation to a dedicated partition. If your hard disk is very fragmented the performance will degenerate.
  2. Hibernation is not supported under Wubi, moreover Wubi filesystem is more vulnerable to hard-reboots (turning off the power) and power outages than a normal filesystem, so try to avoid unplugging the power. An Ubuntu installation to a dedicated partition provides a filesystem that is more robust and can better tolerate such events.

For more information, I suggest you to skim through Wubi’s FAQ page