"Typesetting" functions
Sivakatirswami
katir at hindu.org
Fri Dec 16 06:01:41 EST 2005
As one who is spoiled by options for very precise control over type
all these years (Quark and now InDesign) the challenges of making
text look good in a Revolution field seem daunting.
I was wondering if any one had "rolled their own" typesetting
functions. I would rather not have to create multiple flds and then
group these with some being centered and others align left... so I
was thinking that one could, for example, center type but getting
some measurement of the len(the selection) and then inserting
something like
(an algorithm that needs real code:)
the total length of the line -(the length of type to be centered)/2 =
(some number of spaces to insert in front of the text)
I may be dreaming about cheddar on Mars, because I don't see from the
docs any syntax that can provide a"real" correlation between len
(fooString) and pixelwidth(fooString) that can be translated back
into a tab width or number of spaces...as the pixel width of
fooString will vary by the charWidths of the chars in the string and
again, this has no correlation to the width of a space... and tabs
are out anyway, since you cannot set tabs on a per line basis. (I
hope this is on the feature list as a bare minimum upgrade to text
handling in the next version of rev) etc. etc. round in circles.
a typical thing one would like to be able to do, besides centering
type on a line in a field... would be formatting like this:
someTextLeftAligned [tab or string of spaces] SomeTextRightAligned
I'm hoping some of you may have already "been there done that and yes
it can be done... here's how"
My actual context is rolling credits in a single field with centered
headers for each section followed by
Correspondents
staff country
Photographers:
photographer country
etc.
now I can center all this and it looks fairly decent if you give up
aspirations for any more control and think "well the do it like that
in the movies and if you don't care about things lining up its just
fine..." But this may not fly when it goes up for review... or I
will have to say "sorry, this is all we get in Rev. we have to live
with it like this for now...
TIA
Sivakatirswami
More information about the use-livecode
mailing list