![]() |
#1
|
|||
|
|||
![]()
i know this has to be simple, but i can't seem to put it all together. so far, i'm only able to specify in points and i need to set the size of the font in inches. here's what i've done so far:
i've set the ruler units in inches i've tried 2-3 different ways of setting the font size i know that when i'm working with text in Corel, i can pull up the format text dialog (cntrl-T) and it shows the font size in inches on the character tab. how can i do the same with code? |
#2
|
||||
|
||||
![]()
Try this:
Code:
Sub TextInInches() Dim s As Shape Set s = ActiveLayer.CreateArtisticText(0, 0, "SAMPLE TEXT", cdrEnglishUS, , "Arial", ConvertUnits(1.5, cdrInch, cdrPoint), cdrFalse, cdrFalse, , cdrCenterAlignment) End Sub Shelby |
#3
|
|||
|
|||
![]()
hmmmm, that looks interesting. thanks. i'll let you know after i try it out tomorrow... thanks again.
![]() |
#4
|
|||
|
|||
![]()
that didn't work, it throws a compile error.
i did find something in "CorelScriptTools.ToPoints" but this still didn't size it correctly. i passed in 3" and it set it to 24 pts. still digging here... |
#5
|
|||
|
|||
![]()
i actually had to do this:
CorelScriptTools.ToPoints(CorelScriptTools.FromInches(ColJob(i).LineSize)) really wish there was a better way, would rather not use CorelScript. This is Corel v 11 by the way... |
#6
|
||||
|
||||
![]()
You are corect the ConvertUnits is in CorelDraw 12 not 11. Lets see there are 72 points = 1 inch so how about just taking your variable times 72? Then you would not need the CorelScript Tools. Just a thought.
Shelby |
#7
|
|||
|
|||
![]()
i thought about that. but 24 pt Times isn't the same height as 24 pt Arial. which makes me question whether it would be that simple. on another application that we have, we had to end up making a database of pt sizes versus inches for each font we wanted to use - thankfully there was a limited number. this app will have a considerably larger number of fonts which will make that type of approach unreasonable.
and actually i found that my formula isn't working either. Code:
CorelScriptTools.ToPoints(CorelScriptTools.FromInches(3)) |
#8
|
|||
|
|||
![]() Quote:
Code:
CorelScriptTools.ToPoints(CorelScriptTools.FromInches(ColJob(i).LineSize)) it shouldn't be this difficult i wouldn't think. the other problem with just sizing the shape to the given dimension is that i need the cap height to be this size. if there are any descenders, it throws the whole thing off. there's got to be a way to do this... :? |
#9
|
|||
|
|||
![]()
even more fuel for the fire. Corel's status bar displays the incorrect measurment. if you open the "format Text" dialog, it displays the incorrect height in inches. it looks as though it is simply doing pt / 72 = cap height in inches, which won't be accurate.
|
#10
|
||||
|
||||
![]()
You are correct that if you type a 72point "H" in the Arial font it is not the same height as a 72point "H" in Times New Roman. I don't recall the reasoning, something to do with the space between lines or the desending characters. I know to a font guy it makes sense, but if you are in the sign or monument business you want all the "H" to be 1" or 72 points.
What I ended up doing was creating my own fonts in Macromedia's Fontographer. That way when I say 1" I really get it. So you might consider this an option. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
T1 fonts & Bitstream font nav. vs Corel draw 12 & 11 | xombie | General | 2 | 22-05-2005 17:35 |
weird font issue | bbolte | CorelDRAW/Corel DESIGNER VBA | 1 | 21-04-2005 15:20 |
InsertAfter - Retain Font Size | Craig Tucker | CorelDRAW/Corel DESIGNER VBA | 3 | 07-01-2005 07:42 |
Bitstream Font Nav Problem | ddonnahoe | General | 0 | 16-12-2004 08:25 |
Reading Font Properties from selected text in CD9 | sherman01 | CorelDRAW/Corel DESIGNER VBA | 2 | 24-11-2004 07:59 |