added style to text
measuretext function