Squeak SmalltalkJoker Squeak Smalltalk : Morphic : prevnext Text Style Different In Texts

>> > Tested in both 5156 and 5169 updated images.  Grab a TextMorph and
>> > choose 'text color...' from the halo menu.  Uncheck 'Apply changes
>> > to entire text' and select part of the text.  Choose a style from
>> > the Style popup menu.  When it is applied it is applied to the
>> > entire text not just to the selected text.
>> 
>> Actually, it doesn't affect the entire text, but it affects from the 
>> beginning of the selected text to the end of the text.
>> 
>> So if you select some characters in the middle of the text and change 
>> them, the ones before your selection don't get changed.
>
>I am unable to reproduce what you describe in 3.4b-5169.  If I have a
>TextMorph containing the String 'This is a test of the emergency
>broadcasting system' and select 'test of the emergency' and change the
>style then the font of the entire String changes, both in the preview
>and, when I choose accept, in the original TextMorph (or when I choose
>cancel for that matter).  Oh and I doo have 'Apply changes to entire
>text' unchanged.  To make this clear I started with a downloaded
>3.4b-5156 image and loaded code updates, rejected 3.5 change, then
>saved, exitted, restarted, and loaded code updates again to get to
>5169.  For what it's worth this behaviour is identical in the generic
>5156 image.

This behavior is something general to TextMorph - it is biased toward having 
one TextStyle for the entire text. It is quite happy with different sizes, 
colors and other emphasis, but it takes a little extra work to get it to accept 
a different font mid-stream. 

>Ah thanks for this reply.  I suspected that but then decided that I was
>wrong since the interface certainly implies that the text may be
>composed of mixed fonts.  Rereading the class comment for Text now with
>this concept in mind I can see that implied but not explicitly stated. 
>Am I to think then that changing the font number can only change the
>size?

Yes. TextMorph uses the TextFontChange attribute which selects one of the sizes 
from the single TextStyle that applies to the TextMorph. You can have more than 
one of these size changes in a TextMorph, so size changes are doable. To get 
fundamentally different fonts in a single TextMorph, one would need to use 
TextFontReference attributes which supply a font as well as a size.