Quick hack to make fonts readable in xbmc

XBMC on Ubuntu is quick and painless to install and runs great.

If you are using a smaller tv/monitor, say 24", it can be a bit hard to read the text.

The script below will resize the fonts by a value of 8.

run as

fontfix.sh > Font.xml

#!/bin/sh

INC=8

cat ~/Font.xml | flip -u - | awk '{print "x" $0}' |  while read LINE
do
    #echo $LINE
    echo "x $LINE" | egrep "<size>" >/dev/null 2>&1
    if [ $? -eq 0 ]
    then
        SIZE=`echo $LINE | cut -c 2- | sed -e 's/<size>\(.*\)<\/size>/\1/g'`
        SIZE=`expr $SIZE + $INC`
        if [ $SIZE -gt 80 ]
        then
            SIZE=80
        fi
        printf "\t\t\t<size>${SIZE}</size>\n"
    else
        echo "$LINE" | cut -c 2-
    fi

done