Ned,
You will want to look at implementors of #objectForDataStream:. This method allows substitution of one object for another when writing to disk. The assumption in the case of StrikeFont is that there is a lot of data that *probably* exists in the image that will receive the project, so why bother sening it. When the other system does not, in fact, have the named font, the default font will be substituted.
One way you could get around this for fonts not in the general image is to include a change set with the project which installs the StrikeFont via code in the postscript.
Cheers, Bob
On Sat, 31 Mar 2001 11:30:16 -0800 Ned Konz ned@bike-nomad.com wrote:
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?
On Saturday 31 March 2001 12:29, Bob Arning wrote:
You will want to look at implementors of #objectForDataStream:. This method allows substitution of one object for another when writing to disk. The assumption in the case of StrikeFont is that there is a lot of data that *probably* exists in the image that will receive the project, so why bother sening it. When the other system does not, in fact, have the named font, the default font will be substituted.
One way you could get around this for fonts not in the general image is to include a change set with the project which installs the StrikeFont via code in the postscript.
Thanks for the pointer, Bob.
This is a FormSetFont.
I just defined FormSetFont>>objectForDataStream: to answer self. This worked. My guess is that FormSetFont is used infrequently enough, and for custom situations like this, that this may be the right thing to do in general.
squeak-dev@lists.squeakfoundation.org