Text Formatting Workarounds?

Jim Bufalini jim at visitrieve.com
Wed Apr 22 12:58:11 EDT 2009


Hi Scott,

I've been a little backed up in my emails and so just read this and didn't
see any responses. Just to clarify...

Scott Rossi wrote:

> I poked through the mail archives a bit and found a few responses but
> I'm
> still curious: what do folks do to make text display similarly across
> platforms?
> 
> In the past, I always thought it was a simple matter to set the font
> specs
> of the card or stack and have fields inherit the settings, but it seems
> in
> all my 3/3.5 stacks this doesn't work any more.  Rev seems to apply
> formatting based on the platform on which the stack was saved, and then
> promptly loses the specs when the stack is opened on another platform
> (the
> font/size properties read correctly, but the text doesn't display
> correctly,
> often shrinking down to some weird size/font).

I assume by this you mean you are setting the textFont and textSize of the
card in a preOpenCard script to a known existing platform specific font such
as Tahoma for PC and Lucinda Grande for Mac?

> Setting font specs of a field by script doesn't seem to do anything and
> in
> some cases compounds the problem since, for example, attempting to
> change
> the font or size of text will only change the textheight of field,
> positioning the text improperly in the field.

To change up text in a field, are you setting the HTMLText using something
like <p><font=...> </font></p> or what exactly are you doing?

> Because of the above, I wound up having to format the actual text
> inside the
> fields, as opposed to formatting the fields themselves.  And the
> formatting
> doesn't stick unless there's text in the field so what does one do
> here?  I
> wound up putting space characters in empty fields to hold the
> formatting,
> which is a pretty lousy solution.
> 
> This is ridiculous: it shouldn't be this difficult to format text from
> platform to platform.  What's the secret?

I haven't seen the problem in 3.0 or 3.5, but if you are setting the
textFont and textSize of the CD and experiencing the problem in fields, I'll
see if I can duplicate the issue.

Aloha from Hawaii,

Jim Bufalini




More information about the use-livecode mailing list