Berkeley Vector Fonts. More...

#include "common.h"
#include <stdio.h>
#include <string.h>
#include "bu/file.h"
#include "bu/malloc.h"
#include "bu/vfont.h"
#include "./vfont.h"
Include dependency graph for vfont.c:

Go to the source code of this file.


#define FONTDIR2   "/usr/lib/vfont"
#define DEFAULT_FONT   "nonie.r.12"
#define FONTNAMESZ   128


struct vfont_file get_font (const char *fontname, void(*vfont_log)(const char *fmt,...))
HIDDEN int _vax_gshort (unsigned char *msgp)
struct vfontvfont_get (char *font)
void vfont_free (register struct vfont *vfp)

Detailed Description

Berkeley Vector Fonts.

Provide a machine-independent interface to files containing Berkeley VFONT format fonts, stored with VAX byte ordering and word alignment.

Definition in file vfont.c.

Macro Definition Documentation

#define FONTDIR2   "/usr/lib/vfont"

Definition at line 29 of file vfont.c.

Referenced by vfont_get().

#define DEFAULT_FONT   "nonie.r.12"

Definition at line 30 of file vfont.c.

Referenced by vfont_get().

#define FONTNAMESZ   128

Definition at line 31 of file vfont.c.

Referenced by get_font(), and vfont_get().

Function Documentation

struct vfont_file get_font ( const char *  fontname,
void(*)(const char *fmt,...)  vfont_log 

get_font validates and loads the specified fontname, logging any error messages via the provided log callback.

the ffdes field of the returned struct vfont_file indicates whether the load was successful or not.

Definition at line 37 of file vfont.c.

References bu_brlcad_data(), bu_ftell(), bu_strlcpy, vfont_file::dir, vfont_file::ffdes, FONTNAME, FONTNAMESZ, vfont_file::hdr, header::magic, header::maxx, header::maxy, memset(), vfont_file::offset, header::size, SWAB, and header::xtend.

Here is the call graph for this function:

HIDDEN int _vax_gshort ( unsigned char *  msgp)

Obtain a 16-bit signed integer from two adjacent characters, stored in VAX order, regardless of word alignment.

Definition at line 112 of file vfont.c.

Referenced by vfont_get().

void vfont_free ( register struct vfont vfp)

Definition at line 201 of file vfont.c.

References bu_free(), and vfont::vf_bits.

Here is the call graph for this function: