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
Post a Comment