StrikeFont(NewYork12 15) becomes bold after #saveOnFile

Stéphane Rollandin hepta at zogotounga.net
Sun Jun 1 08:11:31 UTC 2003


ok I did the trick with a TextMorph in NewYork12.

this is what I get in the debugger, when a 'self halt' is prepended to the 
described statement:

self height: 12
self emphasis: 0
self familyName: 'NewYork'

now if I put the halt after the statement, I can also check that dp is a 
DiskProxy whose constructorArgs array is indeed #('NewYork 12 0')


but... removing the halt, saving and loading the morph... it comes bold !



thanks for your help


cheers,

Stef








> > it seems that the text becomes bold on saving.. attached is a TextMorph
> > which when I saved it had plain text, and which when loaded is bold (in a
> > fresh 3.5 image). is that useful to you ?
> >
>
>Yes, the file contains emphasis = 1 for the font at size 15.
>You can place a 'self halt' into
>       StrikeFont class>>familyName: size: emphasized:
>to see that.
>
>When you save a TextMorph, the font information is
>filed out with method
>StrikeFont>>objectForDataStream:
>
>In this method you find this statement:
>
>  dp _ DiskProxy global: #StrikeFont
>                          selector: #familyName:size:emphasized:
>                          args: (Array with: self familyName
>                                             with: self height
>                                             with: self emphasis).
>
>This descriptor contains a class, a class method and three
>method arguments. To reconstruct the instance from this
>descriptor, the method and its arguments are sent to the
>class. That's all.
>
>I think it is that place where the unwanted boldness is written into
>the file. You should place a 'self halt' before this statement
>and explore the values  self familyName, self height, self emphasis.
>Emphasis should be zero for plain fonts and 1 for bold  fonts.
>
>Can you tell me what you see?
>
>Greetings, Boris



More information about the Squeak-dev mailing list