fix adjustment for measureText