Installing Turkey Fonts on Xubuntu Linux

I was playing around on Xubuntu, and wondered how to install new fonts. There are zillion of great fonts over at Search Free Fonts. I especially thought this Turkey Font (shown above) to be appropriate for Thanksgiving Day. Lots of Xmas ones as well!

As to installing, I found this script to be helpful. First, you

sudo mkdir -p /usr/share/fonts/truetype/font-install

then you save the following as an executable file…I called mine “fontinstaller.sh” without quotes. Then, I ran the file by typing “sh ./fontinstaller.sh” without quotes. It installed without problem…of course, I would go through the trouble of downloading and placing all your ttf (font files) in ONE directory to ease installation.

#!/bin/bash

#

# This script helps to install fonts

#

# Set your default font storage directory here

##DEFAULT_DIR=”$HOME/fonts”

DEFAULT_DIR=`pwd`

# Set the default font installation directory here

DEFAULT_DEST=”/usr/share/fonts/truetype/font-install”

# Don’t edit anything below unless you know what you’re doing.

echo “In which directory are the fonts?”

echo -n “[$DEFAULT_DIR] ”

read DIR

echo

echo “What is the extention (without the dot) of the fonts?”

echo -n “[ttf] ”

read EXT

echo

echo “Where should the fonts be installed?”

echo “DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU’RE DOING!”

echo -n “[$DEFAULT_DEST] ”

read DEST

if [ -z “$DIR” ]; then

DIR=”$DEFAULT_DIR”

fi

if [ -z “$EXT” ]; then

EXT=”ttf”

fi

if [ -z “$DEST” ]; then

DEST=”$DEFAULT_DEST”

fi

sudo -v

if [ $? != 0 ]; then

echo “Unable to obtain the necessary privileges. Exiting…”

echo -n “Press to continue. ”

read WER

exit $?

fi

echo

echo

if [ ! -d “$DIR” ]; then

echo “Directory $DIR does not exist. Exiting…”

echo -n “Press to continue. ”

read SDF

exit 2

fi

if [ ! -d “$DEST” ]; then

echo “Directory $DEST does not exist. Exiting…”

echo -n “Press to continue. ”

read DFG

exit 1

fi

echo “Copying fonts…”

cd “$DIR”

for i in *.”$EXT”; do

sudo cp -iv “$i” “$DEST”

done

echo

echo

echo “Updating the font cache…”

sudo fc-cache -fv

if [ $? != 0 ]; then

echo “Error updating the font cache. Your fonts haven’t been completely installed. Try running sudo fc-cache -fv manually. Exiting…”

echo -n “Press to continue.”

read FSF

exit $?

fi

echo

echo

echo “Finished.”

echo

echo “You will probably need to restart running programs to use the new fonts.”

echo -n “Press to exit. ”

read WERT

exit 0


Subscribe to Around the Corner-MGuhlin.net


Discover more from Another Think Coming

Subscribe to get the latest posts sent to your email.

Leave a comment