UXP: Set font of text layer in localized versions

Certain font names are translated in non-English versions of Photoshop, yet the batchPlay command only accepts English font names, making it impossible to set the font of a layer via font name.

For example, if I need to set a new font “Hiragino Mincho Pro” with “W3” style. I need to pass this with my batchPlay command, from a form that users can edit.

image

When the button is clicked, active text layers will be machine translated, their font & style & font size modified based on user input. Since my team are using the Chinese version, there’s no way for them to provide the font name in English. What they can see in the typetool is “ヒラギノ明朝 Pro”.

Any idea? Thanks in advance!