Copy link to clipboard
Copied
Does anyone know why the noBreak property just works when it's turned ON by the script?
I tried all the ways I imagine (because the AI scripting documentation is poor) and nothing works.
For example, these are working:
app.selection.noBreak = true;
app.selection.characterAttributes.noBreak = true;
But these are not working:
app.selection.noBreak = false;
app.selection.characterAttributes.noBreak = false;
Adobe is really working hard on disappoint developer community.
Copy link to clipboard
Copied
it only works if you turn System Layout ON in the Character Panel.
Copy link to clipboard
Copied
Nice, @CarlosCanto. Is there a way to check this option's status with script?
Copy link to clipboard
Copied
I looked for a way but found none unfortunately.
I found out however that if you turn Auto Kern off, it works. But...there is always a but, turning Auto back on doesn't seem to work. Perhaps it does work, except the UI does not update.
see if it this doen't mess up your kerning
selection.characterAttributes.kerningMethod = AutoKernType.NOAUTOKERN;
selection.characterAttributes.noBreak = false; // it doesn't work unless Auto Kern if off or if System Layout is ON