Font.st
changeset 7624 b49d1f99b8dd
parent 7577 81657d05b6ef
child 7701 8ec4585fa762
equal deleted inserted replaced
7623:aa70617876bb 7624:b49d1f99b8dd
   439 onDevice:aDevice ifAbsent:exceptionBlock 
   439 onDevice:aDevice ifAbsent:exceptionBlock 
   440     "create a new Font representing the same font as
   440     "create a new Font representing the same font as
   441      myself on aDevice. This does NOT try to look for existing
   441      myself on aDevice. This does NOT try to look for existing
   442      or replacement fonts (i.e. can be used to get physical fonts)."
   442      or replacement fonts (i.e. can be used to get physical fonts)."
   443 
   443 
   444     |id|
   444     |id xftFont|
   445 
   445 
   446     "receiver was not associated - do it now"
   446     "receiver was not associated - do it now"
   447     device isNil ifTrue:[
   447     device isNil ifTrue:[
       
   448         (aDevice supportsXftFonts 
       
   449         and:[ UserPreferences current useXFontsOnly not ]) ifTrue:[
       
   450             xftFont := (XftFontDescription for:self) onDevice:aDevice ifAbsent:[nil].
       
   451             xftFont notNil ifTrue:[^ xftFont].
       
   452             UserPreferences current useXftFontsOnly ifTrue:[^ nil].
       
   453         ].    
       
   454         
   448         "ask that device for the font"
   455         "ask that device for the font"
   449         id := aDevice 
   456         id := aDevice 
   450                 getFontWithFamily:family 
   457                 getFontWithFamily:family 
   451                 face:face 
   458                 face:face 
   452                 style:style 
   459                 style:style