Sunday, October 4, 2009

Installing Windows XP/Vista true type fonts in Ubuntu 8.04/9.04 system wide

First find out in which location Linux has installed the True Type fonts. It is usually at the location '/usr/share/fonts/truetype/' . But you may also do a search for the same as follows:
# locate .ttf -b

Once you know the path of the fonts directory, move to this directory and create a folder there (it can be any name). On ubuntu or debian like distro's this path will be as below.
# cd /usr/share/fonts/truetype
# sudo mkdir windowsfonts
Note: You need to be logged in as root while doing this, or on Debian like distro's use sudo Next copy all the windows ttf fonts to the windowsfonts directory that was just created.
# sudo cp /sourcefolder/*.ttf /destinationfolder/ (as gathered from above)  
Make sure they have a right of 644 .
# sudo chown root.root *.ttf
# sudo chmod 644 *.ttf
Now run the command mkfontdir while in the windowsfonts directory.
# sudo mkfontdir
Lastly run the command fc-cache to update the cache. (from truetype directory)
# sudo fc-cache -fv
This command will scan the font directories on the system and build font information cache files for applications using fontconfig for their font handling.

No comments:

Post a Comment

Please be courteous, even if you do not share the same view.