Changed text glyph measuring calls from 'getWidth' to 'getLogicalGlyphsWidth' where appropriate.
Added support for font kerning and ligatures. Better handling of font weights.