Annotation of researchv10dc/630/man/src/p_man/man3/infont.3r3l, revision 1.1.1.1

1.1       root        1: .nr Hy 0
                      2: .nh
                      3: .ds ZZ DEVELOPMENT PACKAGE
                      4: .TH INFONT 3R/3L "630 MTG"
                      5: .XE "infont()"
                      6: .XE "getfont()"
                      7: .XE "outfont()"
                      8: .XE "ffree()"
                      9: .SH NAME
                     10: infont, getfont, outfont, ffree \- read a font from the UNIX Operating system
                     11: .SH SYNOPSIS
                     12: .B #include <dmd.h>
                     13: .br
                     14: .B #include <font.h>
                     15: .PP
                     16: .B Font \(**infont (inch)
                     17: .br
                     18: .B int (\(**inch)( );  
                     19: .PP
                     20: .B Font \(**getfont (file) 
                     21: .br
                     22: .B char \(**file;
                     23: .PP
                     24: .B int outfont (f, ouch) 
                     25: .br
                     26: .B Font \(**f;
                     27: .br
                     28: .B int (\(**ouch)( );
                     29: .PP
                     30: .B void ffree (f)
                     31: .br
                     32: .B Font \(**f;
                     33: .SH DESCRIPTION
                     34: The
                     35: .I infont
                     36: function
                     37: creates a Font by reading the byte-wise binary representation
                     38: returned by successive calls to
                     39: .IR inch .
                     40: .I Inch
                     41: must return successive bytes of the \s-1UNIX\s+1 system file representation
                     42: of the font, and -1
                     43: at end-of-file or on encountering an error.
                     44: .I Infont
                     45: will return 0 if memory to store the font cannot be allocated,
                     46: or if the \fIinch\fR routine returns an error.
                     47: .PP
                     48: The
                     49: .I getfont
                     50: function is a higher level form of
                     51: .I infont
                     52: which can be used by programs running under
                     53: .IR jx .
                     54: .I Getfont
                     55: returns a pointer to a Font read from the named UNIX
                     56: .IR file .
                     57: It accomplishes this by opening
                     58: .IR file ,
                     59: and then calling
                     60: .I infont
                     61: with the routine
                     62: .I getc
                     63: as an argument.
                     64: The \fIgetfont\fR function also returns 0 on error.
                     65: .PP
                     66: The
                     67: .I outfont
                     68: function calls the routine
                     69: .I ouch
                     70: to write successive bytes of the binary representation of Font
                     71: .IR \(**f .
                     72: The
                     73: .I outfont
                     74: function
                     75: returns
                     76: a \-1
                     77: on error, as must
                     78: the routine
                     79: .IR ouch .
                     80: .PP
                     81: Programs which use
                     82: .I infont
                     83: or
                     84: .I getfont
                     85: will normally want to cache the font with
                     86: \f2fontcache\f1.
                     87: .PP
                     88: The
                     89: .I ffree
                     90: function
                     91: frees the memory used by a Font allocated by
                     92: .I infont
                     93: or
                     94: .I getfont
                     95: if that font has not been added to the cache with
                     96: .IR fontcache .
                     97: Programs which add fonts to the font cache with
                     98: .I fontcache
                     99: should release the font with
                    100: .IR fontrelease .
                    101: .SH EXAMPLE
                    102: See the example for
                    103: .IR string (3R).
                    104: .SH SEE ALSO
                    105: jx(1), fontrequest(3R), fontsave(3L), structures(3R).

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.