Path: utzoo!utgpu!watmath!watdragon!watsol!tbray From: tbray@watsol.waterloo.edu (Tim Bray) Newsgroups: comp.windows.x Subject: Re: Fonts Summary: What does XDrawImageString really do? Message-ID: <10598@watdragon.waterloo.edu> Date: 4 Jan 89 01:00:50 GMT References: <14034@srcsip.UUCP> <8812301258.AA08155@EXPO.LCS.MIT.EDU> Sender: daemon@watdragon.waterloo.edu Reply-To: tbray@watsol.waterloo.edu (Tim Bray) Organization: U. of Waterloo, Ontario Lines: 31 In article <8812301258.AA08155@EXPO.LCS.MIT.EDU> rws@EXPO.LCS.MIT.EDU (Bob Scheifler) writes: >Because R2 was broken, and R3 has is righter. 9x15 has constant >character-width, but not constant side bearings, ascent, or descent. >"Terminal" fonts like 9x15 were lying about their "ink" metrics in R2, >but are reporting real metrics in R3. On a related but not-identical X11R3 issue... we have an application which (for reasons that seem good to us) would like to refresh an area of text by overwriting the text with XDrawImageString. This is having some subtle problems: 1. when the font metrics are slightly off e.g. roman overwriting oblique adobe-courier-xxxx, and 2. When we overwrite white-on-black with black-on-white in the same font. The problem is that little bits of what was there are sometimes left behind showing around the edges of the new text (looks like an underscore in case #2). Now #1 is probably OK, and we are investigating work-arounds, including twiddling the font, but we can't seem to figure out what XDrawImageString really does. One piece of documentation says it will overwrite the bounding box of the actual string argument, but this is clearly not true (try passing it a string of underscores to show this); presumably then, the bounding box is either font.ascent to font.descent or perhaps font.max_bounds.ascent to font.max_bounds.descent, but none of these seem to be correct. What's the real poop? If nobody knows I'll go thrash through the source, but there's lots of things I'd rather do... Or am I missing something obvious? Thanks in advance, Tim Bray, New Oxford English Dictionary Project, U of Waterloo