Font rendering code cleanup

Dead code removed and warnings fixed