XftFontDescription.st
changeset 6322 bddf04c433df
parent 6319 9402c8781f21
child 6323 2748becb9d6d
equal deleted inserted replaced
6321:e5cfe9d73d37 6322:bddf04c433df
   617 
   617 
   618     "if I am already assigned to that device ..."
   618     "if I am already assigned to that device ..."
   619     (device == aGraphicsDevice) ifTrue:[^ self].
   619     (device == aGraphicsDevice) ifTrue:[^ self].
   620 
   620 
   621     (aGraphicsDevice isNil and:[device notNil]) ifTrue:[
   621     (aGraphicsDevice isNil and:[device notNil]) ifTrue:[
   622         ^ self
   622 	^ self
   623     ].
   623     ].
   624 
   624 
   625     (closestFont notNil and:[closestFont graphicsDevice == aGraphicsDevice]) ifTrue:[
   625     (closestFont notNil and:[closestFont graphicsDevice == aGraphicsDevice]) ifTrue:[
   626         ^ closestFont onDevice: aGraphicsDevice.
   626 	^ closestFont onDevice: aGraphicsDevice.
   627     ].
   627     ].
   628 
   628 
   629     aGraphicsDevice deviceFonts do:[:aFont |
   629     aGraphicsDevice deviceFonts do:[:aFont |
   630         ((aFont class == self class) and:[self sameDeviceFontAs:aFont]) ifTrue:[
   630         ((aFont class == self class) and:[self sameDeviceFontAs:aFont]) ifTrue:[
   631             ^ aFont
   631             ^ aFont
   681                                 yourself.
   681                                 yourself.
   682             aGraphicsDevice registerFont: closestFont.
   682             aGraphicsDevice registerFont: closestFont.
   683             ^ closestFont
   683             ^ closestFont
   684         ].
   684         ].
   685     ] ensure:[
   685     ] ensure:[
   686         self xftPatternDestroy: myPatternId.
   686 	self xftPatternDestroy: myPatternId.
   687         self xftPatternDestroy: closestPatternId1.
   687 	self xftPatternDestroy: closestPatternId1.
   688         self xftPatternDestroy: closestPatternId2.
   688 	self xftPatternDestroy: closestPatternId2.
   689     ].
   689     ].
   690 
   690 
   691     "
   691     "
   692      (XftFontDescription family:'monospace' size:16) onDevice:Screen current
   692      (XftFontDescription family:'monospace' size:16) onDevice:Screen current
   693     "
   693     "
  1834 ! !
  1834 ! !
  1835 
  1835 
  1836 !XftFontDescription class methodsFor:'documentation'!
  1836 !XftFontDescription class methodsFor:'documentation'!
  1837 
  1837 
  1838 version
  1838 version
  1839     ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.31 2014-03-16 21:08:13 cg Exp $'
  1839     ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.32 2014-03-16 22:00:59 cg Exp $'
  1840 !
  1840 !
  1841 
  1841 
  1842 version_CVS
  1842 version_CVS
  1843     ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.31 2014-03-16 21:08:13 cg Exp $'
  1843     ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.32 2014-03-16 22:00:59 cg Exp $'
  1844 ! !
  1844 ! !
  1845 
  1845 
  1846 
  1846 
  1847 XftFontDescription initialize!
  1847 XftFontDescription initialize!