Setting fonts

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting fonts

Charles Hartman
This is a pretty newbie question; what I'm looking for is the right  
general direction to take.

This Dreamcard stack will need to run under the Player on both Mac  
(where I'm writing it) and Windows. The app centers on many cards  
that are full of information, usually in a scrolling text field. Most  
of the text in the field uses whatever I set as the font for the main  
stack (obviously) -- Palatino on Mac, probably Times New Roman on  
Windows. Certain lines within the text on many cards need to be in a  
monospaced font (Courier on Mac, Courier New on Windows).

So two linked questions: What's the best way to set the overall font  
in a script for the main stack (in an "if the platform is" structure  
presumably)? I notice that if I just set the font for the main stack  
(for example, from the message box), it changes on all the cards as  
expected, though of course not in the lines specified with a  
particular font (Courier) -- but ALSO not AFTER that text that's  
marked off for Courier. So that "if the platform is" doesn't seem to  
be be thorough enough. And then, how do I set the font for the  
monospaced lines on all cards?

I suppose the stupid brute-force method would be (on opening the main  
stack) to loop through all lines in the text in all relevant fields  
in all cards in all substacks. Slow & absurd. Should I be looking at  
property sets instead? (That *sounds* right, but I don't really  
understand it yet.) Will this get around the inconsistency in the  
"main" (stack's default) font that I mentioned? And since the  
monospaced lines aren't a separate object from the text around them,  
can they have a property (which can belong to a property set)?

(Putting the monospaced lines into separate objects would be quite a  
mess, especially since they're embedded in scrolling fields, all of  
which I would then have to turn into scrolling groups instead, on  
dozens and dozens of cards.)

Any guidance welcome.

Charles Hartman
Professor of English, Poet in Residence
Connecticut College
[hidden email]
*the Scandroid* is at cherry.conncoll.edu/cohar/Programs





_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Eric Chatonet
Hi Charles,

Some clues which can help:

1. Combining a specified font and a "not specified" font:
If you have a field with no font specified (use owner's font) and  
then you set the font for some lines, for instance, to Courier New  
(selecting these lines and choosing the right font in the Text menu).
Then when you set the textFont of the stack (by script or in the  
properties inspector), only lines which use owner's font will change:  
they will appear in the specified font but the lines previously set  
in Courier New will stay unchanged.
This way assumes that the monospaced font you use is the same on all  
platforms and other texts may change (or the opposite).

To implement the feature, you can use a switch (or if/then/else)  
structure in a preOpenStack handler:

on preOpenStack
   switch the platform
   case "MacOS"
     set the textFont of this stack to x
     break
   case "Win32"
     set the textFont of this stack to y
     break
   default
     answerNotSupported :-)
   end switch
end preOpenStack

Note: If you have many other things to change according to the  
platform, you might be interested in switching profiles.

2. Using "cross-platform" fonts:
For Mac OS X and Win XP, you can use fonts available on both  
platform: Arial, Comic sans MS, Courier New, Georgia,  Tahoma,  
Textile, Times or Verdana (may be I missed one or two).
Then the problem is gone :-)

Best Regards from Paris,

Eric Chatonet.

Le 6 juil. 05 à 05:07, Charles Hartman a écrit :

> This Dreamcard stack will need to run under the Player on both Mac  
> (where I'm writing it) and Windows. The app centers on many cards  
> that are full of information, usually in a scrolling text field.  
> Most of the text in the field uses whatever I set as the font for  
> the main stack (obviously) -- Palatino on Mac, probably Times New  
> Roman on Windows. Certain lines within the text on many cards need  
> to be in a monospaced font (Courier on Mac, Courier New on Windows).
>
> So two linked questions: What's the best way to set the overall  
> font in a script for the main stack (in an "if the platform is"  
> structure presumably)? I notice that if I just set the font for the  
> main stack (for example, from the message box), it changes on all  
> the cards as expected, though of course not in the lines specified  
> with a particular font (Courier) -- but ALSO not AFTER that text  
> that's marked off for Courier. So that "if the platform is" doesn't  
> seem to be be thorough enough. And then, how do I set the font for  
> the monospaced lines on all cards?
>
> I suppose the stupid brute-force method would be (on opening the  
> main stack) to loop through all lines in the text in all relevant  
> fields in all cards in all substacks. Slow & absurd. Should I be  
> looking at property sets instead? (That *sounds* right, but I don't  
> really understand it yet.) Will this get around the inconsistency  
> in the "main" (stack's default) font that I mentioned? And since  
> the monospaced lines aren't a separate object from the text around  
> them, can they have a property (which can belong to a property set)?
>
> (Putting the monospaced lines into separate objects would be quite  
> a mess, especially since they're embedded in scrolling fields, all  
> of which I would then have to turn into scrolling groups instead,  
> on dozens and dozens of cards.)

----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Charles Hartman
Yes, that's what I'm doing. However, as I said, the text _after_ the  
specified-font text does _not_ switch to the altered owner's font.

Let me clarifiy: a field contains a dozen lines, let's say; the first  
six and last four have been created using Palatino, with Palatino as  
the stack font, so there's no font specification on any of those  
lines. Lines 7-8 have had their Text Formatting properties altered so  
their font is specified as Courier. Now in the main stack's script I  
insert the line "set the textfont of me to 'Arial'" and save and  
close the stack and its substacks and reopen. Now on that example  
card, in that field, lines 1-6 are Arial, 7-8 are Courier (all as  
expected) -- but lines 9-12 are still in Palatino.

I'm beginning to think this is a bug. I'll file a BZ on it. Any ideas  
on workarounds meanwhile? That don't involve iterating over all lines  
in all fields on all cards??

Charles Hartman


On Jul 6, 2005, at 2:07 AM, Eric Chatonet wrote:

> 1. Combining a specified font and a "not specified" font:
> If you have a field with no font specified (use owner's font) and  
> then you set the font for some lines, for instance, to Courier New  
> (selecting these lines and choosing the right font in the Text menu).
> Then when you set the textFont of the stack (by script or in the  
> properties inspector), only lines which use owner's font will  
> change: they will appear in the specified font but the lines  
> previously set in Courier New will stay unchanged.
>

Charles Hartman
Professor of English, Poet in Residence
Connecticut College
[hidden email]
*the Scandroid* is at cherry.conncoll.edu/cohar/Programs





_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Eric Chatonet
Hi Charles,

What version of Rev do you use?
Which platform?

Here it's working:
First, you set all textfont specs of any field, card and stack to empty.
You paste a text in any field.
You select the text and set its textfont to "Use Owner's Font" (empty)
You select the lines you want to be in another font as Courier and  
set them.
Now you set the textfont of the stack to any font and all lines the  
textfont of which were empty adopt the specified font (your 9-12  
lines included).
You can change the textfont stack and it's going to work.
You can save and reopen the stack: all is perfect.

Rev 2.6 Mac OS X10.4.1

Le 6 juil. 05 à 14:03, Charles Hartman a écrit :

> Yes, that's what I'm doing. However, as I said, the text _after_  
> the specified-font text does _not_ switch to the altered owner's font.
>
> Let me clarifiy: a field contains a dozen lines, let's say; the  
> first six and last four have been created using Palatino, with  
> Palatino as the stack font, so there's no font specification on any  
> of those lines. Lines 7-8 have had their Text Formatting properties  
> altered so their font is specified as Courier. Now in the main  
> stack's script I insert the line "set the textfont of me to  
> 'Arial'" and save and close the stack and its substacks and reopen.  
> Now on that example card, in that field, lines 1-6 are Arial, 7-8  
> are Courier (all as expected) -- but lines 9-12 are still in Palatino.
>
> I'm beginning to think this is a bug. I'll file a BZ on it. Any  
> ideas on workarounds meanwhile? That don't involve iterating over  
> all lines in all fields on all cards??

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

masmit
In reply to this post by Charles Hartman
I just tried exactly what you described, and it worked just as it
should. This on OS 10.3.9, G4 powerbook, Rev v2.6.

Strangely, though, in the recent thread about changing text size in a
field, preserving relative sizes of styled text, I came across the same
thing, where changing the textSize of a field affected only the
unstyled text before a block of styled text, but not the unstyled text
after....

However, the problem went away, without me doing anything about it, and
from the test just now, seems to be staying away. This must be a bug,
so worth bugzilla-ing, but if it's intermittent, it'll be a bitch to
solve...

Good luck,

Mark


On 6 Jul 2005, at 13:03, Charles Hartman wrote:

> Yes, that's what I'm doing. However, as I said, the text _after_ the
> specified-font text does _not_ switch to the altered owner's font.
>
> Let me clarifiy: a field contains a dozen lines, let's say; the first
> six and last four have been created using Palatino, with Palatino as
> the stack font, so there's no font specification on any of those
> lines. Lines 7-8 have had their Text Formatting properties altered so
> their font is specified as Courier. Now in the main stack's script I
> insert the line "set the textfont of me to 'Arial'" and save and close
> the stack and its substacks and reopen. Now on that example card, in
> that field, lines 1-6 are Arial, 7-8 are Courier (all as expected) --
> but lines 9-12 are still in Palatino.
>
> I'm beginning to think this is a bug. I'll file a BZ on it. Any ideas
> on workarounds meanwhile? That don't involve iterating over all lines
> in all fields on all cards??
>
> Charles Hartman
>
>
> On Jul 6, 2005, at 2:07 AM, Eric Chatonet wrote:
>
>> 1. Combining a specified font and a "not specified" font:
>> If you have a field with no font specified (use owner's font) and
>> then you set the font for some lines, for instance, to Courier New
>> (selecting these lines and choosing the right font in the Text menu).
>> Then when you set the textFont of the stack (by script or in the
>> properties inspector), only lines which use owner's font will change:
>> they will appear in the specified font but the lines previously set
>> in Courier New will stay unchanged.
>>
>
> Charles Hartman
> Professor of English, Poet in Residence
> Connecticut College
> [hidden email]
> *the Scandroid* is at cherry.conncoll.edu/cohar/Programs
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Eric Chatonet
Hi Mark and Charles,

I have had many struggles with fonts and sizes until I understood  
correctly inheritance problems  and, above all, some weird behaviours  
of the engine.
For instance: if you set the textFont to empty, the textSize is set  
to empty too (this feature has been discussed on this list about a  
year ago) and there are other rather weird features...

I can only tell you one thing: we have to be "clean" and a "certain"  
steps order in a process regarding fonts and sizes has to be  
respected when building a stack.
In particular, it seems that when you manipulate fields and fonts and  
sizes in all directions, kinds of droppings (see previous posts about  
default buttons :-) can remain.
That's not clear in the docs: so try, test and test again ;-)

Le 6 juil. 05 à 18:08, Mark Smith a écrit :

> I just tried exactly what you described, and it worked just as it  
> should. This on OS 10.3.9, G4 powerbook, Rev v2.6.
>
> Strangely, though, in the recent thread about changing text size in  
> a field, preserving relative sizes of styled text, I came across  
> the same thing, where changing the textSize of a field affected  
> only the unstyled text before a block of styled text, but not the  
> unstyled text after....
>
> However, the problem went away, without me doing anything about it,  
> and from the test just now, seems to be staying away. This must be  
> a bug, so worth bugzilla-ing, but if it's intermittent, it'll be a  
> bitch to solve...
>
> Good luck,
>
> Mark
>> Le 6 juil. 05 à 18:08, Eric Chatonet a écrit :
>>
>> Here it's working:
>> First, you set all textfont specs of any field, card and stack to  
>> empty.
>> You paste a text in any field.
>> You select the text and set its textfont to "Use Owner's  
>> Font" (empty)
>> You select the lines you want to be in another font as Courier and  
>> set them.
>> Now you set the textfont of the stack to any font and all lines  
>> the textfont of which were empty adopt the specified font (your  
>> 9-12 lines included).
>> You can change the textfont stack and it's going to work.
>> You can save and reopen the stack: all is perfect.
>
> On 6 Jul 2005, at 13:03, Charles Hartman wrote:
>
>
>> Yes, that's what I'm doing. However, as I said, the text _after_  
>> the specified-font text does _not_ switch to the altered owner's  
>> font.
>>
>> Let me clarifiy: a field contains a dozen lines, let's say; the  
>> first six and last four have been created using Palatino, with  
>> Palatino as the stack font, so there's no font specification on  
>> any of those lines. Lines 7-8 have had their Text Formatting  
>> properties altered so their font is specified as Courier. Now in  
>> the main stack's script I insert the line "set the textfont of me  
>> to 'Arial'" and save and close the stack and its substacks and  
>> reopen. Now on that example card, in that field, lines 1-6 are  
>> Arial, 7-8 are Courier (all as expected) -- but lines 9-12 are  
>> still in Palatino.
>>
>> I'm beginning to think this is a bug. I'll file a BZ on it. Any  
>> ideas on workarounds meanwhile? That don't involve iterating over  
>> all lines in all fields on all cards??
>>
>> Charles Hartman
>>
>>
>> On Jul 6, 2005, at 2:07 AM, Eric Chatonet wrote:
>>
>>
>>> 1. Combining a specified font and a "not specified" font:
>>> If you have a field with no font specified (use owner's font) and  
>>> then you set the font for some lines, for instance, to Courier  
>>> New (selecting these lines and choosing the right font in the  
>>> Text menu).
>>> Then when you set the textFont of the stack (by script or in the  
>>> properties inspector), only lines which use owner's font will  
>>> change: they will appear in the specified font but the lines  
>>> previously set in Courier New will stay unchanged.

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts [OT..abit]

Chipp Walters
In reply to this post by Eric Chatonet
For those interested...

I work on a PC, but port many apps to MacOSX. I've found the following
works best for me regarding fonts.

I typically set the textFont property of my stacks to Tahoma. This is
the default system font on the PC and works great, especially with
ClearType font rendering on WinXP. But, as Jeanne DeVoto mentioned to
me, it doesn't come installed on Mac systems. Which is fine, because
then it uses the default font: Lucinda Grande.

best,

Chipp

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts [OT..abit]

Keith Martin-2
Sometime around 6/7/05 (at 14:00 -0500) Chipp Walters said:

>I typically set the textFont property of my stacks to Tahoma. This
>is the default system font on the PC and works great, especially
>with ClearType font rendering on WinXP. But, as Jeanne DeVoto
>mentioned to me, it doesn't come installed on Mac systems. Which is
>fine, because then it uses the default font: Lucinda Grande.

Well, the slightly less attractively named Lucida Grande, to be precise. <g>

The Lucida family was the result of research into legibility of type
produced with low-resolution printers in the early 1980s. (One of the
two designers of the Lucida family also created Apple's Chicago and
Geneva, the two Mac system fonts from 1984 through to the mid-1990s
or so.) It is a superb example of resolution-aware modern type design
borrowing intelligently from type design standards and styles of the
past few centuries.

More practically for y'all reading this, the standard Windows 2000
and XP Lucida Sans is a close visual analog to Mac OS X's Lucida
Grande. But it helps a lot if font smoothing is on on the PC.

k
--

+++++++++++++++++   ++++++++++++++++++++++++++++++++++
      Keith Martin   Technical Editor, MacUser magazine
      MacUser Help   mailto:[hidden email]
      MacUser Work   mailto:[hidden email]

          personal   mailto:[hidden email]
               Web   http://www.vortex.co.uk

              work   +44 (0)20 7907 6360
            mobile   0790 954 1365
              eFax   +44 (0)870 831 7752
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts [OT..abit]

Eric Chatonet
In reply to this post by Chipp Walters
For those interested... (as said Chipp :-)

Here are the shared fonts between Mac OS X and Windows XP:
This does not mean that the result is exactly the same but these  
following fonts "are among the lines of the fontNames" for each  
platform.

Arial (normal, black, narrow)
Century Gothic
Comic sans MS
Courier New
Georgia
Impact
Tahoma
Times New Roman
Verdana
Webdings
Wingdings

Le 6 juil. 05 à 21:00, Chipp Walters a écrit :

> For those interested...
>
> I work on a PC, but port many apps to MacOSX. I've found the  
> following works best for me regarding fonts.
>
> I typically set the textFont property of my stacks to Tahoma. This  
> is the default system font on the PC and works great, especially  
> with ClearType font rendering on WinXP. But, as Jeanne DeVoto  
> mentioned to me, it doesn't come installed on Mac systems. Which is  
> fine, because then it uses the default font: Lucinda Grande.

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts [OT..abit]

Richard Gaskin
Eric Chatonet wrote:
> For those interested... (as said Chipp :-)
>
> Here are the shared fonts between Mac OS X and Windows XP:
> This does not mean that the result is exactly the same

Sadly, not at all.  I went with Verdana on a project because I'd hoped
to have similar font metrics on both projects.  Bad move:  Verdana on
Windows has a much wider m-square than Verdana on OS X.

Moral:  Before settling on a font, compare screen shots with it on each
platform.

--
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  [hidden email]       http://www.FourthWorld.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts [OT..abit]

Sarah Reichelt
In reply to this post by Eric Chatonet
A word of warning. Not all of these are standard with a default Mac  
OS X installation. I think some come with Microsoft Office.

> Here are the shared fonts between Mac OS X and Windows XP:
> This does not mean that the result is exactly the same but these  
> following fonts "are among the lines of the fontNames" for each  
> platform.
>
> Arial (normal, black, narrow)
> Century Gothic
> Comic sans MS
> Courier New
> Georgia
> Impact
> Tahoma
> Times New Roman
> Verdana
> Webdings
> Wingdings
>
Out of Eric's list, the three listed below are NOT available on my Mac:
Century Gothic
Tahoma
Wingdings

Also, a Mac user (& presumably it is the same for Windows) has the  
ability to disable any fonts they like, even fonts used by the  
system. So you can never assume a particular font will be available.

It would be nice to be able to specify a font-family as one does in  
CSS, so you can choose a few alternatives and default to serif or  
sans-serif as a last resort.

Cheers,
Sarah

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Charles Hartman
In reply to this post by Charles Hartman
I need to modify what I wrote before, quoted below.

The text after the special-font (Courier) lines _does_ get set to  
whatever the new default or owner's font is -- UNLESS it (the lines  
without a specified contains any text _style_ changes. A bit in bold,  
or marked as a link, interrupts the transformation, and any text  
after that is in the old, pre-change default font.

How should I get around this? I can imagine searching each card,  
putting any special-format text into temporary variables, setting the  
style of everything to Plain, changing the font, then  
reformatting . . . a nightmare. At the moment, nothing better is  
occurring to me.

Charles Hartman

On Jul 6, 2005, at 8:03 AM, Charles Hartman wrote:

> Let me clarifiy: a field contains a dozen lines, let's say; the  
> first six and last four have been created using Palatino, with  
> Palatino as the stack font, so there's no font specification on any  
> of those lines. Lines 7-8 have had their Text Formatting properties  
> altered so their font is specified as Courier. Now in the main  
> stack's script I insert the line "set the textfont of me to  
> 'Arial'" and save and close the stack and its substacks and reopen.  
> Now on that example card, in that field, lines 1-6 are Arial, 7-8  
> are Courier (all as expected) -- but lines 9-12 are still in Palatino.
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts [OT..abit]

Judy Perry
In reply to this post by Eric Chatonet
Really?  Trebuchet MS isn't among the PC list?

Judy

On Wed, 6 Jul 2005, Eric Chatonet wrote:

> For those interested... (as said Chipp :-)
>
> Here are the shared fonts between Mac OS X and Windows XP:
> This does not mean that the result is exactly the same but these
> following fonts "are among the lines of the fontNames" for each
> platform.
>
> Arial (normal, black, narrow)
> Century Gothic
> Comic sans MS
> Courier New
> Georgia
> Impact
> Tahoma
> Times New Roman
> Verdana
> Webdings
> Wingdings
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Setting fonts

Charles Hartman
In reply to this post by Charles Hartman
(As far as I can tell this didn't go through when I sent it before.)


I need to modify what I wrote before, quoted below.

The text after the special-font (Courier) lines _does_ get set to  
whatever the new default or owner's font is -- UNLESS it (the lines  
without a specified contains any text _style_ changes. A bit in bold,  
or marked as a link, interrupts the transformation, and any text  
after that is in the old, pre-change default font.

How should I get around this? I can imagine searching each card,  
putting any special-format text into temporary variables, setting the  
style of everything to Plain, changing the font, then  
reformatting . . . a nightmare. At the moment, nothing better is  
occurring to me.

Charles Hartman

On Jul 6, 2005, at 8:03 AM, Charles Hartman wrote:

> Let me clarifiy: a field contains a dozen lines, let's say; the  
> first six and last four have been created using Palatino, with  
> Palatino as the stack font, so there's no font specification on any  
> of those lines. Lines 7-8 have had their Text Formatting properties  
> altered so their font is specified as Courier. Now in the main  
> stack's script I insert the line "set the textfont of me to  
> 'Arial'" and save and close the stack and its substacks and reopen.  
> Now on that example card, in that field, lines 1-6 are Arial, 7-8  
> are Courier (all as expected) -- but lines 9-12 are still in Palatino.
>


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Ken Ray

> I need to modify what I wrote before, quoted below.
>
> The text after the special-font (Courier) lines _does_ get set to
> whatever the new default or owner's font is -- UNLESS it (the lines
> without a specified contains any text _style_ changes. A bit in bold,
> or marked as a link, interrupts the transformation, and any text
> after that is in the old, pre-change default font.

That's correct. Inheritance of text attributes is broken as soon as any
style changes. I wish it weren't so, but this is indeed the case.
 
> How should I get around this? I can imagine searching each card,
> putting any special-format text into temporary variables, setting the
> style of everything to Plain, changing the font, then
> reformatting . . . a nightmare. At the moment, nothing better is
> occurring to me.

I have successfully used a frontScript that would trap preOpenCard and then
repeat through all of the fields and set their text attributes to a known
common value, but also checking a custom property of the fields to see if
special handling should occur for a particular field. It works really fast,
and isn't too many lines of code.





_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Charles Hartman

On Jul 7, 2005, at 9:52 AM, Ken Ray wrote:

>
>
>> I need to modify what I wrote before, quoted below.
>>
>> The text after the special-font (Courier) lines _does_ get set to
>> whatever the new default or owner's font is -- UNLESS it (the lines
>> without a specified contains any text _style_ changes. A bit in bold,
>> or marked as a link, interrupts the transformation, and any text
>> after that is in the old, pre-change default font.
>>
>
> That's correct. Inheritance of text attributes is broken as soon as  
> any
> style changes. I wish it weren't so, but this is indeed the case.

Oh dear.

>
>
>> How should I get around this? I can imagine searching each card,
>> putting any special-format text into temporary variables, setting the
>> style of everything to Plain, changing the font, then
>> reformatting . . . a nightmare. At the moment, nothing better is
>> occurring to me.
>>
>
> I have successfully used a frontScript that would trap preOpenCard  
> and then
> repeat through all of the fields and set their text attributes to a  
> known
> common value, but also checking a custom property of the fields to  
> see if
> special handling should occur for a particular field. It works  
> really fast,
> and isn't too many lines of code.
>

Cool. But (1) what about "special handling" that affects not a whole  
field but some chunks within the field? And (2) doesn't this approach  
take an awful lot of (that is, potentially a noticeable amount of) time?

Charles Hartman



>
>
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

Charles Hartman
Professor of English, Poet in Residence
Connecticut College
[hidden email]
*the Scandroid* is at cherry.conncoll.edu/cohar/Programs





_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Ken Ray

>> I have successfully used a frontScript that would trap preOpenCard
>> and then
>> repeat through all of the fields and set their text attributes to a
>> known
>> common value, but also checking a custom property of the fields to
>> see if
>> special handling should occur for a particular field. It works
>> really fast,
>> and isn't too many lines of code.
>>
>
> Cool. But (1) what about "special handling" that affects not a whole
> field but some chunks within the field? And (2) doesn't this approach
> take an awful lot of (that is, potentially a noticeable amount of) time?

Well, (1) if you needed to do that, you'd have to store the chunk you wanted
to affect and how you wanted to affect it, like a custom property with:

  1,5,bold
  6,20,italic

which would make the first 5 chars bold and the next 15 chars italic (I
know, a bad example, but you know what I mean).

(2) No, it doesn't (surprisingly). I have screens with a hundred+ objects on
it and executing even something that repeats through the fields and sets
their text attributes is very fast. Rev is well-suited to do this kind of
stuff, it seems.





_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Marielle Lange
In reply to this post by Charles Hartman
>Strangely, though, in the recent thread about changing text size in a
>field, preserving relative sizes of styled text, I came across the same
>thing, where changing the textSize of a field affected only the
>unstyled text before a block of styled text, but not the unstyled text
>after....

>However, the problem went away, without me doing anything about it, and
>from the test just now, seems to be staying away. This must be a bug,
>so worth bugzilla-ing, but if it's intermittent, it'll be a bitch to
>solve...

Feel free to check out the presentation styler palette:

go stack url
"http://revolution.lexicall.org/stacks/education/tools_plugins/presentationstyler.rev"

I played with text formatting the way you suggest... I vaguely remember I came
across the same problem and I believe I came up with a satisfactory "work
around".

Marielle

http://revolution.lexicall.org/wiki/
Wiki of the revolution in education community
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Setting fonts

Marielle Lange
In reply to this post by Charles Hartman
      Keith Martin   Technical Editor, MacUser magazine

Dear Keith,

Any chance to see a 2-3 pages tutorial on how to use revolution to create
applications with revolution in your excellent magazine? I have come across
rave reviews on revolution in mac journals, but not yet across cool tutorials.

Marielle
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution