Collaboration diagram for Vector Fonts:


file  vfont.h
file  vfont.c
 Berkeley Vector Fonts.

Data Structures

struct  vfont_dispatch
struct  vfont


#define SXT(c)   ((c)|((c&0x80)?(~0xFF):0))
#define VFONT_NULL   ((struct vfont *)NULL)


struct vfontvfont_get (char *font)
void vfont_free (struct vfont *font)

Detailed Description

Macro Definition Documentation

#define SXT (   c)    ((c)|((c&0x80)?(~0xFF):0))

Definition at line 73 of file vfont.h.

Referenced by vfont_get().

#define VFONT_NULL   ((struct vfont *)NULL)

Definition at line 91 of file vfont.h.

Referenced by vfont_get().

Function Documentation

struct vfont* vfont_get ( char *  font)

Fetch the named font, and return a struct vfont pointer.

First the filename provided is used, then the BRL-CAD font directory is searched (for places where "system" directories are considered sacred), and then finally the ordinary font directory is searched.

The font files are treated as pure byte streams, and are expected to be in VAX order.

VFONT_NULL is returned on error. On ordinary errors, the function is silent. On extraordinary errors, a remark is placed on stderr.

Definition at line 124 of file vfont.c.

References _vax_gshort(), BU_ALLOC, bu_brlcad_data(), bu_free(), bu_malloc(), DEFAULT_FONT, FONTDIR2, FONTNAMESZ, magic, SXT, UNLIKELY, vfont_dispatch::vd_addr, vfont_dispatch::vd_down, vfont_dispatch::vd_left, vfont_dispatch::vd_nbytes, vfont_dispatch::vd_right, vfont_dispatch::vd_up, vfont_dispatch::vd_width, vf_bits, vf_dispatch, vf_maxx, vf_maxy, vf_xtend, and VFONT_NULL.

Here is the call graph for this function:

void vfont_free ( struct vfont font)

Return the storage associated with a struct vfont