Skip to main content
Participant
March 1, 2023
Question

reconnecting expanded script

  • March 1, 2023
  • 3 replies
  • 727 views

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!

This topic has been closed for replies.

3 replies

rob day
Community Expert
Community Expert
March 2, 2023

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:

 

Peter Spier
Community Expert
Community Expert
March 1, 2023

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.

eduairet
Participating Frequently
March 1, 2023

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

Robert at ID-Tasker
Legend
March 2, 2023

Looks like translation gone wrong 😉 

 

eduairet
Participating Frequently
March 1, 2023

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();
    }
}