'From Squeak3.8-Nihongo of 2 March 2005 [latest update: #24] on 11 March 2005 at 7:48:23 am'! "Change Set: StrikeFontSetShutdown Date: 11 March 2005 Author: Takashi Yamamiya Reset all StrikeFontSet when shutdown for saving disk. "! !FontTest commentStamp: 'tak 3/11/2005 14:31' prior: 0! I am mainly a test for fallback font. FontTest buildSuite run! !FontTest methodsFor: 'testing' stamp: 'tak 3/11/2005 16:24'! testResetAfterEmphasized "self debug: #testResetAfterEmphasized" | normal derivative | normal _ TextStyle defaultFont. derivative _ normal emphasized: 3. self assert: (normal derivativeFonts at: 2) == derivative. normal reset. self assert: normal derivativeFonts isEmpty ! ! !StrikeFont methodsFor: 'emphasis' stamp: 'tak 3/11/2005 17:09'! reset "Reset the cache of derivative emphasized fonts" | style font | fallbackFont class = FixedFaceFont ifTrue: [fallbackFont _ nil]. derivativeFonts _ Array new: 32. #('B' 'I' 'BI') doWithIndex: [:tag :index | (style _ TextStyle named: self familyName) ifNotNil: [(font _ style fontArray detect: [:each | each name = (self name , tag)] ifNone: [nil]) ifNotNil: [derivativeFonts at: index put: font]]]! ! !StrikeFont class methodsFor: 'derivative font caching' stamp: 'tak 3/11/2005 16:27'! shutDown "StrikeFont shutDown" "Deallocate synthetically derived copies of base fonts to save space" self allSubInstancesDo: [:sf | sf reset]. StrikeFontSet allSubInstancesDo: [:sf | sf reset]. DefaultStringScanner _ nil. ! !