Ship it with Squeak

Dan Ingalls Dan.Ingalls at disney.com
Fri Jul 7 16:06:21 UTC 2000


>On Sat, 01 Jul 2000 11:01:50 -0700 Tim Rowledge <tim at sumeru.stanford.edu> wrote:
>>> So please let me repeat my question: Can you show one word written in font 
>>> Comic12 and another word in font NewYork12 in the same workspace in the 
>>> same size?  Looking at the "Welcome to..." window, there should be a way, 
>>> but AFAIK, you can't.
>>Oh really, of course you can. Add some more fonts to the textstyle.
>>There's nothing there that makes it impossible or even hard to mix
>>fonts. Included is a tiny gif to illustrate.
>
>There is actually another wany that no one has mentioned:
>
>| t comic |
>t _ 'hello, world' asText.
>comic _ TextStyle named: #ComicBold.
>t addAttribute: (TextFontReference toFont: (comic fontOfSize: 24)) from: 8 to: 12.
>StringHolder new textContents: t; openLabel: 'x'.
>
>It would be easy to add attributes of TextFontReference to selected text in much the same manner that sizes and colors are done today.

I too was surprised that no one knew about TextFontReference.  Adding the interface which you suggest would certainly simplify access to this capability.

Also, we could add an extended 'copy with actual font references' command to the text editor.  This would convert relative font references (font1, font2, etc) in the copied text to absolute font refereces determined from the textStyle of the source paragraph.  Then if the selection were pasted elsewhere, it would retain its original fonts.

	- Dan






More information about the Squeak-dev mailing list