fixes to fonttype js