Unable to set the font name of a textItem

Trying to set the font name of a layer’s textItem using the characterStyle.font property. But i cannot see any change in font style in either the document or in the character properties panel.

layerData.layer.textItem.characterStyle.font = "TimesNewRomanPSMT";

In the ps_reference docs font property has both Read and Write access.
I am able to read the font. I am confused why setting the font is not working. I am also using the postScriptName of a font as mentioned in docs.

Any input would be helpful.

do you get any error messages in the console?
if not try wrapping your code in a try/catch ans see if anything happens

I assume you’re executing your code as modal, right?

also are you able to change contents of the same layer?

Thanks for the response.
Yes, i am using executeAsModal to run write operations in which i am using try-catch. No errors in plugin console.

But i get this error in UXP Developer Tool console:

[console] [DP] SELECT called with no target name [object Object]

Not sure what this is about.