Help Changing Fonts.
i'm using below code. i'm trying replace few fonts in paragraph , character styles.
function cb7callback(target) { var docs = app.documents; (var d = docs.length-1; d >= 0; d--) { var doc=docs[d]; var bold = doc.characterstyles; (var = 0; < bold.length; a++) { if (bold[a].appliedfont=="helvetica neue lt pro" && bold[a].fontstyle =="77 bold condensed") { bold[a].appliedfont = "suisse int'l condensed" bold[a].fontstyle = "bold" } } } (var d = docs.length-1; d >= 0; d--) { var doc=docs[d]; var reg = doc.characterstyles; (var = 0; < reg.length; a++) { if (reg[a].appliedfont=="helvetica neue lt pro" && reg[a].fontstyle =="57 condensed") { reg[a].appliedfont = "suisse int'l condensed" reg[a].fontstyle = "regular" } } }
font styles such bold italic reguler, etc classified part of font name: set font use "arial\tbold" bold style of arial. , size of text use pointsize rather fontstyle.. make selection have size of 32 use: app.activedocument.selection[0].pointsize = "32pt"
More discussions in InDesign Scripting
adobe
Comments
Post a Comment