Mantis - Squeak
Viewing Issue Advanced Details
4791 Kernel minor always 09-09-06 14:06 09-09-06 14:06
Krivanek  
 
normal  
new 3.10  
open  
none    
none  
0004791: [KernelImageOverride] TextStyle replaceFontsIn:with:
TextStyle replaceFontsIn:with:

original:

replaceFontsIn: oldFontArray with: newStyle
    "
    TextStyle replaceFontsIn: (TextStyle looseFontsFromFamily: #Accuny) with: (TextStyle named: #Accuny)
    "
    "Try to find corresponding fonts in newStyle and substitute them for the fonts in oldFontArray"

    newStyle fontArray do: [ :newFont | newFont releaseCachedState ].

    oldFontArray do: [ :oldFont | | newFont |
        oldFont reset.
        newFont _ (newStyle fontOfPointSize: oldFont pointSize) emphasis: oldFont emphasis.
        oldFont becomeForward: newFont ].

    StringMorph allSubInstancesDo: [ :s | s layoutChanged ].
    TextMorph allSubInstancesDo: [ :s | s layoutChanged ].
    SystemWindow allInstancesDo: [ :w | [ w update: #relabel ] on: Error do: [ :ex | ] ].
    World ifNotNilDo: [ :w | w changed ].

override:

replaceFontsIn: oldFontArray with: newStyle
    "
    TextStyle replaceFontsIn: (TextStyle looseFontsFromFamily: #Accuny) with: (TextStyle named: #Accuny)
    "
    "Try to find corresponding fonts in newStyle and substitute them for the fonts in oldFontArray"

    newStyle fontArray do: [ :newFont | newFont releaseCachedState ].

    oldFontArray do: [ :oldFont | | newFont |
        oldFont reset.
        newFont := (newStyle fontOfPointSize: oldFont pointSize) emphasis: oldFont emphasis.
        oldFont becomeForward: newFont ].

    UIManager default onFontsChanged.


Morphic dependent part replaced with new UIManager message

There are no notes attached to this issue.