Skip navigation
Currently Being Moderated

How can I simply create a text frame with perfect rounded ends?

Apr 1, 2012 1:06 AM

I'm recreating a new edition of a book that was originally created in Quark. It uses round-ended text frames. When using the simplest method of corner options, the ends aren't proper semicircles, even though the radius is set to half the height of the frame.

The other problem is that I can't reduce the width sufficiently to make it look balanced. I use the direct selection tool to close in the right-hand end, so that I don't distort the shape. There's no right indent for the paragraph, but as I reduce the width the text breaks into two lines, even though I've greater space after the text than the left indent. My best solution was to create the shape in Illustrator and copy and paste into InDesign, assign text content, centre thte text vertically, use 3mm left indent. I still couldn't pull the right-hand end in tight enough. So I had to resort to making a group of the lozenge shape with a normal rectangular text frame on top.

 

Does anyone know why these problems occur, and can Adobe improve the corner option?

 

Screen Shot 2012-04-01 at 08.56.44.png

 
Replies
  • Currently Being Moderated
    Apr 1, 2012 3:11 AM   in reply to JerryPF

    Corner effects changed in ID when they went "live" and they lost the ability to make a real semicircle. You can still use the Pathfinder, though, to combine shapes.

     

    Having screen grabs with non-printing characters showing (and select the frame so we can see any applied insets) might give some insight into the fitting problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 3:44 AM   in reply to JerryPF

    I'm not seeing any obvious reason for the sizing problem. Can you post that sample page someplace and put a link here?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 6:01 AM   in reply to JerryPF

    It looks like a bug to me.

     

    You'll want to delete your personal information when replying by email. I've done it for you on the last two posts.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 9:28 AM   in reply to JerryPF

    The second link worked fine. Did you see my previous response? Looks to me like you found a bug.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 10:54 AM   in reply to JerryPF

    So it would seem. I can reproduce it across sevral versions of ID, using both your file and files I create here.

     

    It's not you.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 2:53 PM   in reply to JerryPF

    There is a pre-written script present in the indesign , named as "Cornereffects"

     

    that script doesn't show the limitation that we have in corner effects but the only disadvantage is that there is no preview and you have define the offset value again if you entered it wrong.

     

     

    Windows>scripts,  In the panel  go to applications-->users-->javascript-->cornereffects.jsx

     

     

    This might help

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 1, 2012 4:46 PM   in reply to JerryPF

    Not even a downgrade to version 2.0.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 12:35 AM   in reply to JerryPF

    @Jerry – to get perfect round corners (and some more features), Hans Haesler wrote some wonderful scripts:

     

    EckenEffekte_504d.js

    EckenEffekteMix_504d.js

    EckenEffektePlus_504d.js

     

    The scripts are in german. Be "warned", that if you type in a decimal point the script immediately will change that to a "comma", which is perfectly right in german language.

     

    You'll find the scripts among others at the download page at www.fachhefte.ch. Look for the JavaScripts section.

     

    Uwe

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 1:39 AM   in reply to Peter Spier

    What's the bug?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 3:11 AM   in reply to Eugene Tyson

    Eugene Tyson wrote:

     

    What's the bug?

    The bug appears to be in how ID fits the text in the frame. At a long length you can left, center or right-align the text in that shape and it will works fine, but as you shorten the shape you reach a point where there is more space on eihter end than was used when that end was the one to which the text was previously aligned, so you would expect the text to continue to fit if you shorten some more, but when you do the line breaks. Making the frame a bit deeper restores the line, which would lead you to think the leading slug is running up against the curves, but that's not a problem when you have the longer frame (you can highlight the text to see the slug and it is tucking into the curve area), so if it becomes a problem, I think that's a bug.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 3:43 AM   in reply to JerryPF

    One Sledgehammer Script coming up: select your text frame and run this little Javascript. It adds rounded sides as per original frame size and copies line color and thickness from the text frame (where it is removed). Then it groups everything together, and leaves it selected (since you started with a selection as well).

     

    It adds the new objects (rectangle, circles) simply to the parent of the selected text frame -- under normal circumstances, that ought to be the page you are looking at.

     

    textframe = app.selection[0];
    left = textframe.geometricBounds[1];
    right = textframe.geometricBounds[3];
    height = textframe.geometricBounds[2] - textframe.geometricBounds[0];
    center = (textframe.geometricBounds[2] + textframe.geometricBounds[0])/2;
    radius = height/2;
    leftRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,left-radius,center+radius,left+radius]});
    riteRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,right-radius,center+radius,right+radius]});
    rectBetween = textframe.parent.rectangles.add({geometricBounds:[center-radius,left,center+radius,right]});
    roundedRect = rectBetween.addPath([leftRounded,riteRounded]);
    roundedRect.properties = {strokeWeight:textframe.strokeWeight,strokeTint:textframe.strokeTint,strokeColor:textframe.strokeColor};
    textframe.properties = {strokeWeight:0};
    app.select(textframe.parent.groups.add([roundedRect,textframe]));
    
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 4:23 AM   in reply to JerryPF

    Could it be faster/easier to just ungroup, delete the existing frame, and re-create it?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 4:34 AM   in reply to JerryPF

    Wait -- why not make the script do all the work after you resized a frame! Replace the first line with this new fragment (the first line itself is the same, it's the if..stuff that counts):

     

    textframe = app.selection[0];
    if (textframe instanceof Group && textframe.pageItems.length == 2)
    {
      roundedRect = app.selection[0].polygons[0];
      textframe = app.selection[0].textFrames[0];
      textframe.properties = {strokeWeight:roundedRect.strokeWeight,strokeTint:roundedRect.strokeTint,strokeColor:roundedRect.strokeColor};
      roundedRect.remove();
      app.selection[0].ungroup();
    }
    

     

    It copies the rounded rectangle stroke properties to the textframe and deletes the rounded rectangle, effectively leaving the object ready to be processed as if you selected the original text frame.

     

    Don't use it on a frame that you tinkered with manually, though, as those edits will be lost ... (well, apart from re-sizing).

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 4:55 AM   in reply to [Jongware]

    One last refinement: It's convenient if the script allows you to Undo/Redo its actions -- let me add that for completeness' sake. The following is the complete script again, no further editing required.

     

    //DESCRIPTION:Overlay round corners on a single textframe
    // A Jongware Script 2-Apr-2012
     
    app.doScript(function(textframe){
    if (textframe instanceof Group && textframe.pageItems.length == 2)
    {
    roundedRect = app.selection[0].polygons[0];
    textframe = app.selection[0].textFrames[0];
    textframe.properties = {strokeWeight:roundedRect.strokeWeight,strokeTint:roundedRect.strokeTint,strokeColor:roundedRect.strokeColor};
    roundedRect.remove();
    app.selection[0].ungroup();
    }
    left = textframe.geometricBounds[1];
    right = textframe.geometricBounds[3];
    height = textframe.geometricBounds[2] - textframe.geometricBounds[0];
    center = (textframe.geometricBounds[2] + textframe.geometricBounds[0])/2;
    radius = height/2;
    leftRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,left-radius,center+radius,left+radius]});
    riteRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,right-radius,center+radius,right+radius]});
    rectBetween = textframe.parent.rectangles.add({geometricBounds:[center-radius,left,center+radius,right]});
    roundedRect = rectBetween.addPath([leftRounded,riteRounded]);
    roundedRect.properties = {strokeWeight:textframe.strokeWeight,strokeTint:textframe.strokeTint,strokeColor:textframe.strokeColor};
    textframe.properties = {strokeWeight:0};
    app.select(textframe.parent.groups.add([roundedRect,textframe]));
    }, ScriptLanguage.JAVASCRIPT, app.selection[0], UndoModes.ENTIRE_SCRIPT, "Overlay Round Corners");
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points