it is possible to set 'composer' property with a String value
in Japanese version, following code works,
please try in your language.
var doc = app.documents.add(); var pstyle = doc.paragraphStyles.add(); $.writeln(pstyle.composer); // => Adobe 日本語段落コンポーザー pstyle.composer = "Adobe 日本語単数行コンポーザー"; $.writeln(pstyle.composer); // => Adobe 日本語単数行コンポーザー
thanks, milligramme, it works.
please check as Correct Answer to close this thread.
@Milligramme – there are also locale-independent strings for both Japanese composers:
"$ID/HL Single J" "$ID/HL Composer J"
Did a test in InDesign CC v9.3.0 (German) and applied the "Adobe Japanese Single-line Composer" to a paragraphStyle by scripting.
myParagraphStyle.composer = "$ID/HL Single J";
This is not possible working in the UI only.
Don't know, if I ever would need something like that, but I think it's worth mentioning.
nice! I could get those CONST? by this script
var key_string = app.findKeyStrings("Adobe 日本語単数行コンポーザー"); $.writeln(key_string); // => $ID/HL Single J
and in the same way
CS5 doesn't has "Adobe World-Ready Single-line Composer" yet.
// "Adobe World-Ready Single-line Composer" // app.findKeyStrings("Adobe 多言語対応単数行コンポーザー") pstyle.composer = "$ID/HL Single Optyca";
I could add "Adobe World-Ready Single-line Composer" to the paragraph style, but I don't know it works or not.