textHeight and textSize
Ferdinand
fwvo at planet.nl
Sat Apr 21 07:20:07 EDT 2007
Thanks for your time and answer.
Setting the font works fine here. I try to be more specific with my
point:
I need the exact line height needed for the font and font size. So
the font fits exactly in the line.
For example:
For the font "Arial" with a size of 96 pts, the line height should be
110 pts to fit the font exactly.
But for the font "Zapfino" with a size of 96 pts it should be 324 pts.
And "Verdana" needs 117 pts to fit on a line. (with a font size of 96)
(i checked this on the texteditor on my Mac... )
It would be nice if there was a way to find this out and program it
within Revolution.
Otherwise I think I need to make a table with the font name and the
line height/font size ratio...
I hope I made my point clear this time, and I am sorry if it was not
before...
thanks again for your time.
Ferdinand.
simplsol at aol.com wrote:
> With textSize it's either automatic or manual.
> To make manual adjustments:
> First set choose the textFont and textSize from the Text Formatting
> Palette
> Second choose the textHeight from the Basic Properties Palette
> ANY change to the first palette will change the textHeight to Rev's
> default (not just textSize changes).
> You can set a typeface or font for the entire stack, rather than
> field by field and button by button, if you want. However any
> fields or buttons that already have a typeface selected will not
> have it overrided. So if you are going for a global typeface change
> run a script similar to this:
> repeat with i = 1 to the number of flds
> set the textFont of fld i to empty
> set the textSize of fld i to empty
> set the textHeight of fld i to empty
> end repeat
>
> Paul Looney
>
>>
>>
>> Hi All,
>>
>> I have some troubles with the textHeight and textSize properties.
>>
>> The documentation says:
>>
>> "
>> If you change the field's textSize, Revolution automatically sets
>> the textHeight to trunc(4/3 * the textSize of field). For example,
>> if the textSize is set to 12, the textHeight is set to 16 by
>> default. If the textSize is set to 14, the textHeight is set to 18.
>> "
>>
>> With some fonts this is okay, but I have some fonts with a
>> greater textHeight/textSize ratio. For example handwriting fonts.
>> With these fonts the text looks not so nice in a field.
>> Is there a way to determine the good textHeight : textSize ratio
>> within Revolution ?
>>
>> Thanks for your help!
>
More information about the use-livecode
mailing list