• I want to thank all the members that have upgraded your accounts. I truly appreciate your support of the site monetarily. Supporting the site keeps this site up and running as a lot of work daily goes on behind the scenes. Click to Support Signs101 ...

Issues centering text

CanuckSigns

Active Member
I seem to be having issues with text centering in coreldraw x5, we are setting up files with 3 numbers centered in a square of a certain size, it seems that corel centers the text to the bounding box of the text rather than to the text itself. as a result text (especially numbers) are way off centre in the square (see photo)

my current workaround is to convert the text to curves, which adjusts the bounding box to fit exactly snug along the letters, however this is not ideal when we are doing thousands of these (they are engraved tags)

does anyone have any idea or workaround for this? i would even be open to a Macro of some sort I could purchase.

Thanks
 

Attachments

  • corel centred text.jpg
    corel centred text.jpg
    37.2 KB · Views: 130

CanuckSigns

Active Member
That's weird, I've never noticed that.

To shorten the workaround (you may already be doing this) would be using shortcuts, so Ctrl Q then P which would convert then center on page.

You could also easily record that as a macro then apply to all pages in the document.

Yeah i've done the shortcuts, after page 300 of ctrl+Q, P, PgDn, you start to hallucinate lol.

I've never had success recording a macro, have you done it? can you point to a tutorial online?
 

Kottwitz-Graphics

New Member
That's weird, I've never noticed that.

I've noticed that Corel does that. It's a pain in the butt, but I always seem to have to make a second set of copy / numbers, convert to curves, and then recenter it. I keep the unconverted text off to the side so that if I ever have to go back, I know what font I used.
 

J Hill Designs

New Member
Ive noticed it too, but, especially with text, there is almost always a need to visually center it anyway, 1's being the worst
 

graphicwarning

New Member
I've never had success recording a macro, have you done it? can you point to a tutorial online?

If you go into the Macro Manager and Create a new project (under global macros) use this code...

ActiveSelectionRange.AlignRangeToPageCenter (cdrAlignVCenter)
ActiveSelectionRange.AlignRangeToPageCenter (cdrAlignHCenter)
ActiveSelectionRange.OrderBackOne

When you run it, anything that is selected at the time will do the same thing as Ctrl P, Q & PgDn

For tutorials... there is A LOT of tutorials in the CorelDraw community/forum. I don't remember Johns username... but there is a guy in there named John that did a lot of blog posts/tutorials in the Corel forum of basic macros... and Shelby in the oberonplace.com forum has lots examples also!
 

CanuckSigns

Active Member
If you go into the Macro Manager and Create a new project (under global macros) use this code...

ActiveSelectionRange.AlignRangeToPageCenter (cdrAlignVCenter)
ActiveSelectionRange.AlignRangeToPageCenter (cdrAlignHCenter)
ActiveSelectionRange.OrderBackOne

When you run it, anything that is selected at the time will do the same thing as Ctrl P, Q & PgDn

For tutorials... there is A LOT of tutorials in the CorelDraw community/forum. I don't remember Johns username... but there is a guy in there named John that did a lot of blog posts/tutorials in the Corel forum of basic macros... and Shelby in the oberonplace.com forum has lots examples also!

thanks!
I your script seems to work great for single page documents, however when we setup files for engraving, each tag has it's own page, soo 300 tags = 300 page document, how would you word a script that converts multiple page documents to curves, centres the object to the page and moves on to the next page?
 

bob

It's better to have two hands than one glove.
I seem to be having issues with text centering in coreldraw x5, we are setting up files with 3 numbers centered in a square of a certain size, it seems that corel centers the text to the bounding box of the text rather than to the text itself. as a result text (especially numbers) are way off centre in the square (see photo)...

That's because, with most fonts, numerals are mono-spaced so you can line them up in columns. It's been this way pretty much since the dawn of movable type.
 

graphicwarning

New Member
thanks!
I your script seems to work great for single page documents, however when we setup files for engraving, each tag has it's own page, soo 300 tags = 300 page document, how would you word a script that converts multiple page documents to curves, centres the object to the page and moves on to the next page?

Sorry... I misunderstood what you were trying to do... but I think I get it now.

There is no error handling in this, and it's not pretty... but I believe it does what you want.

Save your documents first... I'm not responsible if it crashes Corel! :Big Laugh

I did it in X7... but I think everything should be X5 compatible.


Sub ConvertAllPages()
Dim pg As Page
Dim i As Integer

ActiveDocument.BeginCommandGroup ("Convert all Pages")
Application.Optimization = True

For Each pg In ActiveDocument.Pages
i = pg.Index
ActiveDocument.Pages(i).Shapes.All.CreateSelection
ActiveSelection.ConvertToCurves
ActiveSelection.AlignAndDistribute 3, 3, 2, 0, False, 2
Next pg


ActiveDocument.EndCommandGroup
Application.Optimization = False
Application.Refresh
ActiveWindow.Refresh

End Sub
 

graphicwarning

New Member
And I might add to my previous post... be patient. 300 pages might take a minute to convert... it doesn't necessarily mean it's not working.
 

shoresigns

New Member
That's because, with most fonts, numerals are mono-spaced so you can line them up in columns. It's been this way pretty much since the dawn of movable type.
Exactly. And this will typically cause centering problems when the number "1" is at the beginning or end of the line, since it's much narrower, but it typically only becomes a problem when you have extremely tight margins around the text.

You can either convert to outlines or you can manually adjust the kerning before/after the 1.
 
Top