RTE Custom styles plugin- issue with style selection check mark



I have created a custom style plugin in rte. For OOTB style plugin when selection is made and saved it can be viewed even after dialog is closed and opened again. But for the custom plugin when style is selected and saved, when we opened back we are unable to see which style is selected. Please find the pictures below.



In the first case i have selected h2 center alignment. Even if the dialog is opened and saved authors can see that. But in second case Avenir 13 is selected the style is getting applied but authors when they come back and see they aren't able to see which selection is it. Can some one please help with it?