class: XftFontDescription
authorStefan Vogel <sv@exept.de>
Thu, 06 Mar 2014 15:28:22 +0100
changeset 6314 9dabc3489ff4
parent 6313 2b9a1e4d6f96
child 6315 27f1a761148e
class: XftFontDescription added: #getFontMetrics
XftFontDescription.st
--- a/XftFontDescription.st	Thu Mar 06 15:28:08 2014 +0100
+++ b/XftFontDescription.st	Thu Mar 06 15:28:22 2014 +0100
@@ -1396,6 +1396,24 @@
     "Created: / 21-12-2013 / 01:20:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+getFontMetrics
+    |info|
+
+    info := DeviceWorkstation::DeviceFontMetrics new.
+    info
+      ascent:self ascent
+      descent:self descent
+      maxAscent:self maxAscent
+      maxDescent:self maxDescent
+      minWidth:self maxWidth
+      maxWidth:self maxWidth
+      avgWidth:self maxWidth
+      minCode:self minCode
+      maxCode:self maxCode
+      direction:#LeftToRight.
+    ^ info
+!
+
 height
     "return the height - the number of pixels above plus below the baseLine."
 
@@ -1741,11 +1759,11 @@
 !XftFontDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.28 2014-02-17 22:21:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.29 2014-03-06 14:28:22 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.28 2014-02-17 22:21:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.29 2014-03-06 14:28:22 stefan Exp $'
 ! !