>># 
>># 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: qrytxtex16.m,v 1.11 92/06/11 17:09:00 rws Exp $
>># 
>>#      SCCS:  @(#)  EFon2.mc Rel 1.5	    (10/2/91)
>>#
>>TITLE XQueryTextExtents16 CH06
>>ASSERTION A XQueryTextExtents16-1
When the font_ID argument is a valid GContext resource,
then a call to XQueryTextExtents16 returns the bounding box
of the specified 16-bit or 2-byte character string, string,
as rendered in the font in the corresponding GC's font
field.
>>STRATEGY
Create drawable
Create gc usable with the drawable.
For each xtest font
  Load font
  Set font into gc.
  Set font_ID to be the GContext from the gc
  XQueryTextExtents16.
  Verify by direct calculation from the metrics.
>>ASSERTION A XQueryTextExtents16-2
When the font_ID argument is a valid Font resource, then a
call to XQueryTextExtents16 returns the bounding box of the
specified 16-bit or 2-byte character string, string, as
rendered in the font with font ID font_ID.
>>STRATEGY
For each xtest font
  Load font
  XQueryTextExtents16.
  Verify by direct calculation from the metrics.
>>ASSERTION - XQueryTextExtents16-3
When the font is defined with linear indexing rather than
2-byte matrix indexing, then each XChar2b structure is
interpreted as a 16-bit number with byte1 as the
most-significant byte.
>>ASSERTION - XQueryTextExtents16-4
The ascent field of overall is set to the maximum of the
ascent metrics of all characters in the string.
>>ASSERTION - XQueryTextExtents16-5
The descent field of overall is set to the maximum of the
descent metrics of all characters in the string.
>>ASSERTION - XQueryTextExtents16-6
The width field of overall is set to the sum of the
character-width metrics of all characters in the string.
>>ASSERTION - XQueryTextExtents16-7
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 - XQueryTextExtents16-8
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 - XQueryTextExtents16-9
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 - XQueryTextExtents16-10
When the font has no defined default character, then
undefined characters in the string are taken to have all
zero metrics.
>>ASSERTION - XQueryTextExtents16-11
Characters with all zero metrics are ignored.
>>ASSERTION - XQueryTextExtents16-12
When the font has no defined default_char, then the
undefined characters in the string are also ignored.
>>ASSERTION A XQueryTextExtents16-13
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
