How to access Document Installed fonts using jsx.
hi,
for fonts other document installed ones, scripting dom gives font propeties "location", using can access fonts location. document installed fonts (see here, definition), scriting dom throws error- "requested font family not available", while accessing many properties location, fullname, fontstylename etc. i've tried getting reflection of "font" object , printing out properties , values. see properties isvalid: true, index: -1, fontfamily: <name>, name: <fonts name>, status: not_available not throwing exception.
does know how access font_family along style (bold/italics) , file location?
please let me know if thing unclear.
script print font's propeties can like:
function getfontname (font) {
var fil=new file(folder.desktop+"/sample.txt");
fil.open('a');
var objref = font.reflect.properties;
for(var obj in objref){
alert(objref[obj]);
try{
alert(font[objref[obj]]);
}catch(e){
alert(e.description);continue;
}
fil.writeln(objref[obj]+":"+font[objref[obj]]);
}
fil.close();
}
hello srikanth,
recently i've dealt similar issue. me works with:
_docfonts = app.activedocument.fonts.everyitem().getelements();
if use “appliedfont” in combination document fonts, not work, unfortunately have no idea why.
now question want exactly.
roland
More discussions in InDesign Scripting
adobe
Comments
Post a Comment