482 "set the font to be selected initially" |
482 "set the font to be selected initially" |
483 |
483 |
484 |encoding| |
484 |encoding| |
485 |
485 |
486 selectedFont := aFont. |
486 selectedFont := aFont. |
|
487 currentFamily := aFont family. |
|
488 currentFace := aFont face. |
|
489 currentStyle := aFont style. |
|
490 currentSize := aFont size. |
|
491 currentFaceAndStyle := currentFace,'-',currentStyle. |
|
492 |
487 self xftFontsOnlyHolder value:(aFont isXftFont). |
493 self xftFontsOnlyHolder value:(aFont isXftFont). |
488 encoding := aFont encoding. |
494 encoding := aFont encoding. |
489 sizeUnit := aFont sizeUnit. |
495 sizeUnit := aFont sizeUnit. |
490 |
496 |
491 "/ self halt. |
497 "/ self halt. |
1203 ] |
1209 ] |
1204 ]. |
1210 ]. |
1205 |
1211 |
1206 faceList list:list. |
1212 faceList list:list. |
1207 currentFaceAndStyle notNil ifTrue:[ |
1213 currentFaceAndStyle notNil ifTrue:[ |
|
1214 (list includes:currentFaceAndStyle) ifFalse:[ |
|
1215 currentFaceAndStyle = 'normal-roman' ifTrue:[ |
|
1216 (list includes:'regular-roman') ifTrue:[ |
|
1217 currentFaceAndStyle := 'regular-roman'. |
|
1218 currentFace := 'regular'. |
|
1219 currentStyle := 'roman'. |
|
1220 ]. |
|
1221 (list includes:'medium-roman') ifTrue:[ |
|
1222 currentFaceAndStyle := 'medium-roman'. |
|
1223 currentFace := 'medium'. |
|
1224 currentStyle := 'roman'. |
|
1225 ]. |
|
1226 ]. |
|
1227 ]. |
1208 (list includes:currentFaceAndStyle) ifTrue:[ |
1228 (list includes:currentFaceAndStyle) ifTrue:[ |
1209 faceList setSelectElement:currentFaceAndStyle. |
1229 faceList setSelectElement:currentFaceAndStyle. |
1210 self faceSelected:currentFaceAndStyle showPreview:showPreview. |
1230 self faceSelected:currentFaceAndStyle showPreview:showPreview. |
1211 ^ self |
1231 ^ self |
1212 ] |
1232 ] |
1213 ]. |
1233 ]. |
1214 list notEmptyOrNil ifTrue:[ |
1234 list notEmptyOrNil ifTrue:[ |
1215 "/ faceList setSelectElement:(list first). |
1235 "/ faceList setSelectElement:(list first). |
1216 faceList selectElement:(list first). |
1236 faceList selectElement:(list first). |
1217 self faceSelected:(list first) showPreview:showPreview. |
1237 self faceSelected:(list first) showPreview:showPreview. |
|
1238 self updateSizeList. |
1218 ^ self |
1239 ^ self |
1219 ]. |
1240 ]. |
1220 |
1241 |
1221 sizeList list:nil. |
1242 sizeList list:nil. |
1222 self clearPreview. |
1243 self clearPreview. |