Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Resize selected line height / spacing

Return to Member Forum

  • Author
    Posts
    • #60697
      u-s-m
      Member

      I'm looking for a posibility to resize quickly the line height / spacing of a selected text by one or more points without resizing all line heights / spacings to the same point size. I need to find a plugin or a script that allows to resize the line height / spacing of a text selection and must handle different sized text and line heights / spacings in the selection.

      There exists a script written by Thomas Silkjær for resizing text heights in the same manner. Unfortunately I didn't found someting similar for line heights / spacings and I don't know nothing about scripting to adapt Thomas' script.

      Maybe somebody can help? Thanks in advance from Germany!

    • #60701
      David Blatner
      Keymaster

      The best way to do this is to use the keyboard shortcuts. For example, select the text and press command-shift-. (period/dot). That will increase all text by 2 points. If you want it to change by a diferent value, you can change this in the Units & Increments pane of the Preferences dialog box.

      Another option is to use Blatner Tools (blatnertools.com), which has a panel and keyboard shortcuts that let you change this (and other values, such as indents) much faster than using preferences.

    • #60702
      David Blatner
      Keymaster

      Oh, wait… I misunderstood. You mean changing leading! Yes, the same answer, but the shortcut is option/alt-Up or Down Arrow (on the keyboard).

    • #60703

      I don't know why you might want to do this by script, but here it is:

      Main();

      function Main() {
      if (app.documents.length == 0) {
      alert (“Please open a document, select some text, and try again.”);
      exit();
      }
      else if (app.selection.length > 1 || app.selection[0].hasOwnProperty(“baseline”) == false) {
      alert (“Please select some text, and try again.”);
      exit();
      }

      var the_document = app.documents[0];
      var the_selection = app.selection[0];

      var the_dialog = app.dialogs.add({name:”Change leading in the selected text”});
      with(the_dialog.dialogColumns.add()){
      with(dialogRows.add()){
      staticTexts.add({staticLabel:”Change leading in the selected text by”});
      var increase_by = measurementEditboxes.add({editUnits:MeasurementUnits.POINTS, editValue:0});
      }
      }
      var dialog_result = the_dialog.show();

      if (dialog_result) {
      if (the_selection.leading != Leading.AUTO) {
      the_selection.leading = the_selection.leading + increase_by.editValue;
      }
      else {
      the_selection.leading = (the_selection.pointSize * (the_selection.autoLeading/100)) + increase_by.editValue;
      }
      }
      }

      Written in CS5.5, Windows.

      Warning: it's not totally tested — just a quick exercise in scripting before going to bed.

      Make sure that Preferences > Type > Apply Leading to Entire Paragraphs should be off.

      Regards,
      Kasyan

    • #60710
      u-s-m
      Member

      Hi David, hi Kasyan,

      thanks for your help – the shortcuts are that what I have searched for. I'm working since version 2.0 with ID but until now I didn't knew them. They will make my life easier. Thanks again and regards from Germany!

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Forum Ads