next up previous
Next: xfontmetrics Up: simxlib Previous: xtextarray

xfont


     NAME
	  xfont	- part of Simula to Xlib interface

     DESCRIPTION
	     X_Font class XFont(fontName);
	     text      fontName; ! the full, X11-style name of the
	     font.;
	  This class models a Font in the X server. There is  no  need
	  for  more  than  one single XFont object for each font in an
	  application.	The creation of	XFont object  are  handled  by
	  the	XFontManager   which   handle	also  substitution  of
	  unavailable fonts. The  user	application  should  thus  not
	  create XFont objects directly. XFont objects are used	by the
	  application:

	  - as parameters to certain operations	concerned by the  Font
	  used for displaying information in the XServer.

	  - to measure the graphical extent of a text  string  printed
	  using	the Font.

	  Measurements of the Font itself are available	in this	class:
	  Measurements	of  the	 extent	 of  a strings in this font is
	  available as opertion	TextWidth in this class. More  complex
	  measurements	on  text  strings  are	avilable  in the class
	  XFontMetrics.	 XFonts	come in	 single	 byte  (8-bit)	or  in
	  two-byte  (16-bit)  formats.	Simula texts directly supports
	  single-byte formats.

	  SUPERS: x_font,Xlib_font,Xlib_object;
	  KIND:	Objects	created	by XFontManger;
	  INIT:	Initializes itself (calls Load/Query Font as needed by
	  itself);
	  Sequencing: (TextWidth/GetFontProperty/Direction/FontAscent/
	  :	       FontDescent, SingleByte)*

     OPERATIONS
     Direction
	     integer procedure Direction;
	  Returns   the	  direction,   either	'FontRightToLeft'   or
	  'FontLeftToRight.'   These  constants	 are  defined  in this
	  class.

     FontAscent
	     integer procedure FontAscent;
	  Returns the overall maximum ascent for the font.

     FontDescent
	     integer procedure FontDescent;
	  Returns the overall maximum descent for the font.

     SingleByte
	     Boolean procedure SingleByte;
	  Returns true if this is a single-byte	font.