grogers@bullwinkle.cs.uiuc.edu (Greg Rogers) (02/28/90)
Here's a bug that has always been in ATK since it first ran on X but that I keep forgetting about. fontdesc__StringSize(self, graphic, string, XWidth, YWidth) When used with X, this method always returns a height (YWidth) of zero. A better approximation would be to set the height to the maximum height of a character in the font. greg rogers
mss+@andrew.cmu.edu (Mark Sherman) (03/01/90)
(It's not a bug, it's a feature.) I think the implementation is correct. I don't have the manual in front of me, but I think the values returned by fontdesc_StringSize(self, graphic, string, XWidth, YWidth) are supposed to be how much the current location moves in the XWidth distance and and YWidth distance if that string were imaged. Because most people use Latin alphabets that are horizontal, there is no vertical movement for imaging a string, hence YWidth of 0. I think you want the font height if you want to know how tall characters are. -Mark