logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

libhersheyfont - Hershey vector fonts library

Author

libhersheyfont was written by Kamal Mostafa <kamal@whence.com>.

                                                 2 December 2013                               LIBHERSHEYFONT(3)

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);

See Also