photoshop - Return postscript font name quickly -


using cs2, there not quicker way postscript name of font looping on installed fonts , comparing names?

function gimmepostscriptfontname(f) {   numoffonts = app.fonts.length;   (var = 0, numoffonts; < numoffonts; i++)   {     fnt = app.fonts[i].name;      if (f == fnt)     {       return app.fonts[i].postscriptname;     }   } } 

for future reference:

var mylayer = app.activedocument.layers[0]; var myfont = app.fonts.getbyname(mylayer.textitem.font).name; alert(myfont); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -