added support for uppercase text width calculation