Add text measure code