>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: qrytxtextn.m,v 1.12 92/06/11 17:09:07 rws Exp $
>># 
>>#      SCCS:  @(#)  EFon2.mc Rel 1.5	    (10/2/91)
>>#
>>TITLE XQueryTextExtents CH06
>>ASSERTION A XQueryTextExtents-1
When the font_ID argument is a valid GContext resource,
then a call to XQueryTextExtents returns the bounding box of
the specified 8-bit character string, string, as rendered
in the font in the corresponding GC's font field.
>>STRATEGY
Make a string consisting of all characters from 0 to 255
Create drawable
Create gc usable with the drawable.
For each xtest font
  Load font
  Set font into gc.
  Call XQueryTextExtents.
  Verify by direct calculation from the metrics.
>>ASSERTION A XQueryTextExtents-2
When the font_ID argument is a valid Font resource, then a
call to XQueryTextExtents returns the bounding box of the
specified 8-bit character string, string, as rendered in
the font with font ID font_ID and returns non-zero.
>>STRATEGY
Make a string consisting of all characters from 0 to 255
For each xtest font
  Load font.
  Call XQueryTextExtents.
  Verify by direct calculation from the metrics.
>>ASSERTION - XQueryTextExtents-3
The ascent field of overall is set to the maximum of the
ascent metrics of all characters in the string.
>>ASSERTION - XQueryTextExtents-4
The descent field of overall is set to the maximum of the
descent metrics of all characters in the string.
>>ASSERTION - XQueryTextExtents-5
The width field of overall is set to the sum of the
character-width metrics of all characters in the string.
>>ASSERTION - XQueryTextExtents-6
The lbearing field of overall is set to the minimum L of
all characters in the string, where for each character L is
the left-side-metric plus the sum of the character widths of
all preceding characters in the string.
>>ASSERTION - XQueryTextExtents-7
The rbearing field of overall is set to the maximum R of
all characters in the string, where for each character R is
the right-side-bearing metric plus the sum of the character
widths of all preceding characters in the string.
>>ASSERTION - XQueryTextExtents-8
The font_ascent_return argument is set to the logical
ascent of the font, the font_descent_return argument is set
to the logical descent of the font and the direction_return
argument is set to either FontLeftToRight or
FontRightToLeft.
>>ASSERTION - XQueryTextExtents-9
When the font has no defined default character, then
undefined characters in the string are taken to have all
zero metrics.
>>ASSERTION - XQueryTextExtents-10
Characters with all zero metrics are ignored.
>>ASSERTION - XQueryTextExtents-11
When the font has no defined default_char, then the
undefined characters in the string are also ignored.
>>ASSERTION A XQueryTextExtents-12
When the font argument does not name a valid GContext or
font resource, then a BadFont error occurs.
>>STRATEGY
Pass a bad font
Verify BadFont error occurs
Pass a bad gc
Verify BadFont error occurs
