Path: utzoo!attcan!uunet!husc6!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: XFontStruct numbers useless? Message-ID: <8811181451.AA20578@EXPO.LCS.MIT.EDU> Date: 18 Nov 88 14:51:11 GMT References: <281@stan.com> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 33 In particular, how does one determine the total space occupied by a font, in order to size a window to enclose it? Since I'm not sure exactly what you mean by this, it's hard to answer exactly. How does one determine if a font has it's own imbedded interline spacing, as the 9x15 font appears to? Read the protocol document; font-ascent and font-descent are logical extents to be used for line spacing. These numbers should be viewed as the font designer's "minimum" line spacing, in a sense. The ink metrics of particular characters might or might not stick out on either side of this; it's up to the font designer. If you want to know the ink extents, look at the ink metrics; if you want to know the logical extents, look at the logical metrics. Is there a reliable way to determine if interline whitespace is already included in the font, and what it is? Yes, get your fonts from a reliable source. None of the numbers give a reliable hint as to how many pixels must be added at the beginning of a string to accomodate characters which stick out to the left of their bounding box, or at the end for those which stick out to the right. I don't understand. Comparing the ink metrics of each character to its width will give you this information. If the font has constant character widths, then comparing the min/max bounds ink metrics against this width will tell you.