Use QTextLayout for computing word withs rather than a homebrew solution