'From Squeak3.2alpha of 2 October 2001 [latest update: #4614] on 17 December 2001 at 8:52:01 pm'! "Change Set: TextFontFix-ar Date: 17 December 2001 Author: Andreas Raab Fixes an off-by-one problem when changing the font."! !TextMorphEditor methodsFor: 'attributes' stamp: 'ar 12/17/2001 20:51'! fontSelectionNamed: fontName pointSize: ptSize "Set the current selection to the given font name in the appropriate point size" | style font attr | style _ TextStyle named: fontName. style ifNil:[^self]. font _ style fonts detect:[:any| any pointSize = ptSize] ifNone:[nil]. font ifNil:[^self]. attr _ TextFontReference toFont: font. paragraph text addAttribute: attr from: startBlock stringIndex to: (stopBlock stringIndex-1 min: paragraph text size). paragraph composeAll. self recomputeInterval. morph changed.! !