libhersheyfont - Hershey vector fonts library
Contents
Description
The Hershey fonts are a collection of vector fonts developed circa 1967 by Dr. A. V. Hershey.
libhersheyfont provides C routines to load and process .jhf format Hershey font files.
A Hershey font may be loaded with herhsey_font_load() or herhsey_font_jhf_load(), either of which returns
a pointer to a newly allocated structhershey_font. This structure should be freed after use with a call
to herhsey_font_free().
The glyph line segment data for each ASCII character may be accessed with herhsey_font_glyph().
See the hersheyfont.h header file for the details of the structure members.
Environment Variable
HERSHEY_FONTS_DIR
The directory in which herhsey_font_load() expects to find .jhf font files (The default directory
is likely /usr/share/hershey-fonts/ or /usr/local/share/hershey-fonts/ depending on the build
configuration).
Example
See hershey-font-example.c for a complete working example program, including code to parse the glyph
data. Likely location:
/usr/share/doc/libhersheyfont/examples/hershey-font-example.c
Fonts
hershey_font_load()'s fontname parameter must be the name of a system-installed Hershey font. The
Hershey fonts likely to be installed are:
astrology, cursive, cyrillic, futural, futuram, gothgbt, gothgrt, gothiceng, gothicger, gothicita,
gothitt, greekc, greek, greeks, japanese, markers, mathlow, mathupp, meteorology, music, rowmand,
rowmans, rowmant, scriptc, scripts, symbolic, timesg, timesib, timesi, timesrb, timesrherhsey_font_jhf_load()'s jhffile parameter must be the filename of a Hershey font .jhf file.
Name
libhersheyfont - Hershey vector fonts library
Synopsis
#include<hersheyfont.h>structhershey_font*hershey_font_load(constchar*fontname);structhershey_font*hershey_jhf_font_load(constchar*jhffile);structhershey_glyph*hershey_font_glyph(structhershey_font*hf,unsignedcharc);voidhershey_font_free(structhershey_font*hf);
