Copy link to clipboard
Copied
Hello! Maybe this is a super beginner question, but...is there a way to reconnect the individual letters of a word together after a script font have been expanded without leaving InDesign? For example, I'm writing the word "English" and I'd like to reconnect the letters because the script looks funny in between. Especially the i, which looks like Mt. St. Helens (it's missing its peak). Thank you!
Copy link to clipboard
Copied
Maybe by copying and pasting the expoanded characters in a new TextFrame?
var doc = app.activeDocument;
// You can use an easy to find style for expanded words
var expandedStyle = doc.paragraphStyles.item('expanded');
// Find your expanded letters
var findOptions = {
includeHiddenLayers: true,
includeLockedLayersForFind: true,
includeLockedStoriesForFind: true,
includeHiddenLayers: true,
appliedTo: Document,
};
app.findGrepPreferences = null;
app.findGrepPreferences.properties = findOptions;
app.findGrepPreferences.appliedParagraphStyle = expandedStyle;
app.findGrepPreferences.findWhat = /^[^\r\s]/.source;
var expanded = doc.findGrep();
// Create the container of your new word
var newFrame = doc.pages[0].textFrames.add({
geometricBounds: ['50pt', '50pt', '100pt', '150pt'],
});
// Iterate through your expanded letters
for (var i = expanded.length - 1; i >= 0; i--) {
var expandedChar = expanded[i];
if (
expandedChar &&
expandedChar.isValid &&
expandedChar.constructor.name === 'Character'
) {
// If they are valid letters just copy and paste
expandedChar.select();
app.copy();
newFrame.insertionPoints[0].select();
app.paste();
}
}
Copy link to clipboard
Copied
What do you mean expanded? Increased letter spacing?
If you only need to expand the text a small amount you should try scaling the glyphs instead of changing the spacing. Script fonts are generally pretty rigidly designed for a specific spacing.
Copy link to clipboard
Copied
For some reason I thought about a script that expanded the font and put it in different TextFrames LOL, very bad reading comprehension, but yes, understanding what does expanded mean is a great start
Copy link to clipboard
Copied
Looks like translation gone wrong 😉
Copy link to clipboard
Copied
Indeed haha!
Copy link to clipboard
Copied
Hi @Robin233487402z9x , What script font are you using? If the text’s paragraph has been justified or tracked you might get gaps. For a single pair, you can put your cursor between the letters and reduce the Kerning or Tracking: