Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gstatt(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fonts

Code Page Switching

gstatt

Purpose

     Sets the text attributes for annotated text.

C Syntax

     int gstatt_ (color, page, baseline, font, name)

     int *color, *page, *baseline, *font;
     char *name;

FORTRAN Syntax

     INTEGER function gstatt (color, page, baseline, font, name)

     INTEGER color, page, baseline, font
     CHARACTER*n name

Pascal Syntax

     FUNCTION gstatt_ (

     VAR color, page, baseline, font: INTEGER;
     VAR name: ARRAY [0..k| of CHAR
     ): INTEGER [PUBLIC|;

Description

     The  gstatt subroutine  defines  the  attributes for  the
     class of text drawing functions.

     Parameters

     color             Specifies  a text  color  entry in  the
                       color map.  If it  is -1, the attribute
                       is unchanged.

     page              Specifies the  code page of a  font for
                       the display  to use.  The  valid values
                       for IBM supplied fonts  are 0, 1, and 2
                       for code pages P0,  P1, and P2, respec-
                       tively.   The  value  -1  indicates  no
                       change.

                       For  printers  and plotters,  the  page
                       parameter  is a  font value  specifica-
                       tion.   The IBM  3812 Pageprinter  sup-
                       ports 128 different code pages.  Again,
                       the value -1 indicates no change.

     baseline          Determines  the direction  of the  text
                       drawing. The valid values are:

                       -1  Attribute remains unchanged.

                        0  Specifies  0  degrees, or  left  to
                           right in the viewer's terms.

                        1  Specifies 90 degrees,  or up in the
                           viewer's terms.

                        2  Specifies 180 degrees,  or right to
                           left in the viewer's terms.

                           Note:  The characters appear upside
                           down.

                        3  For  270 degrees,  or  down in  the
                           viewer's terms.

                       If the baseline is other than 0 degrees
                       and the font index  is 0, then the font
                       named by  the name parameter must  be a
                       pre-rotated  font.    When  a  baseline
                       change is made,  another font path name
                       is required.

     font              Specifies,  for displays,  the font  to
                       use  for text  output operations.   For
                       printers and plotters,  the font param-
                       eter specifies  the vertical  height of
                       the font in pixels.

                       If the  font index is -1,  no change is
                       made.   If the  font index  is 0,  then
                       gstatt uses  the font specified  by the
                       name parameter.  If the font index is a
                       value from 1 to 14, the GSL uses one of
                       the following predefined fonts:

                                        Font Index    Width x Height    Style           Filename
                                                      (in pixels)

                                         1             9 x 20           Normal          nrm1.9x20
                                         2             9 x 20           Italic          itl1.9x20
                                         3             9 x 20           Bold            bld1.9x20
                                         4             8 x 14           Normal          nrm1.8x14
                                         5             4 x  8           Normal          nrm1.4x8
                                         6            18 x 40           Normal          nrm1.18x40
                                         7            12 x 30           Normal          nrm1.12x30
                                         8             9 x 20           Ergonomic       erg1.9x20
                                         9             6 x  9           Normal          nrm1.6x9
                                        10             6 x 11           Normal          nrm1.6x11
                                        11             7 x 15           Normal          nrm1.7x15
                                        12             7 x 22           Normal          nrm1.7x22

                                        Font Index    Width x Height    Style           Filename
                                                      (in pixels)

                                        13            11 x 23           Normal          nrm1.11x23
                                        14            11 x 23           Bold            bld1.11x23

                       All left  to right fonts are  stored in
                       the   /etc/vtm   directory.    Matching
                       rotated   fonts  are   stored  in   the
                       /usr/lpp/gsl/fonts directory.

     name              Contains the  null-terminated full path
                       name  of the  file used  when the  font
                       attribute  is specified  as user.   See
                       "fonts" for the format of this file.

     If a  single-shift control  is outstanding and  gstatt is
     called  to change  the code  page or  the font,  then the
     single-shift  control   is  ignored.   (See   "Code  Page
     Switching" for details about single-shift controls.)

     For  Pascal,  the  application must  declare  the  arrays
     passed as being  fixed length and declare  the routine as
     accepting arrays  of that length.   The k in  the routine
     declaration must be a constant.

Return Value

     GS_SUCC   Successful.
     GS_COLI   Invalid color index.
     GS_CPID   Invalid code page identifier.
     GS_BASL   Invalid baseline direction.
     GS_FNTI   Invalid font index.
     GS_FNTN   Invalid file name.

Related Information

     In this book:  "fonts" and "Code Page Switching."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026