Why can't I save new TextStyles with a project? (was Re: Project saving problems/questions)

Ned Konz ned at bike-nomad.com
Sat Mar 31 19:30:16 UTC 2001


On Friday 30 March 2001 13:30, Ned Konz wrote:

> 2. I'd like to use a nice-looking font. If I use TTSampleStringMorphs,
> it works, but these are quite large (>200K more) in the project. So I
> read a new font from a TrueType file and used it. But it doesn't seem to
> save with the project: textMorphs that used the new font become NewYork
> when loaded back in. The space analysis doesn't show any instances of
> FormSetFont being saved with the project.
>
> How can I get this font to save with the project?

I've looked into this a bit further. Even if I set a workspace variable to my 
new TextStyle (which has pointers to the appropriate FormSetFonts), when my 
project gets loaded back in, the TextStyle points to "New York".

OK, so I read the class comment for ImageSegment. It says that what gets 
stored are objects that aren't pointed to by anything outside the project.

I removed the TextConstants entry for my new TextStyle VerdanaZ. I then used 
the inspector to make sure that nothing outside the project was pointing to 
it.

But the TextMorph ended up being changed to New York, again!

Is there something odd happening here?

How can I get a local TextStyle stored and restored with a project?

What other kinds of objects is this going to happen with?

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list