The GNU Plotutils' Distribution

Contents

Hershey Information in Plotutils 2.4.1

The GNU® Plotutils package contains essentially all of Dr. Hershey's occidental and oriental glyph repertories, together with many additional glyphs from other sources. It is also an excellent source for bibliographic and other information about the Hershey glyphs.

In the 2.4.1 release, the actual glyph data are encoded using the Hurt bias-82 encoding as a large data structure in the file "libplot/g_her_glyph.c". This file also contains information on encoding and sources for the glyphs. The distribution also contains other relevant information in various locations. Although any citation from a particular distribution level will become outdated rapidly, for convenience I'll reproduce here the information from Plotutils 2.4.1:

(Note: I've added ".txt" to any ".doc" actual filenames as copied here, so as not to confuse web browsers.)

Extracting the Occidental Glyph Data: extract_gp_occ.c

As presented in Plotutils, the glyph data is in a large C language data structure, as appropriate for direct use by the Plotutils package. For my purposes I needed the raw data, so I wrote a simple program, extract_gp_occ.c, to extract it. This program may be compiled with a small makefile. It expects, in its local directory, a copy of the glyph file g_her_glyph.c and "sys-defines.h" and "extern.h" (which may be null and are created by the supplied makefile). The output of the extraction is given here in the data file data_glyphs_occidental.txt (Hershey Glyphs, OCcidental).

Here's the extraction program:

/* extract_gp_occ.c

   This program extracts the values from the array
   _occidental_hershey_glyphs[] in the GNU Plotutils file
   "libplot/g_her_glyph.c".

   It should be compiled together with "g_her_glyph.h",
   which in turn requires that files "sys-defines.h" and
   "extern.h" exist (but they may be null).  One possible
   makefile entry for this would be:

extract_gp_occ: extract_gp_occ.c
	touch sys-defines.h
	touch extern.h
	cc -o extract_gp_occ extract_gp_occ.c g_her_glyph.c

   This program takes no input and writes to stdout.

   This program has been tested only against the GNU Plotutils
   release 2.4.1 g_her_glyphs.c file.

*/


#include <stdio.h>

extern const char * const _occidental_hershey_glyphs[];


int main()
{
int ix;
int num_pairs;
int max_num_pairs;
int longest_glyph;

   max_num_pairs = 0;
   longest_glyph = 0;
   for (ix = 0; ix <= 4194; ix++) {
      num_pairs = (int)strlen(_occidental_hershey_glyphs[ix])/2;
      if (num_pairs > max_num_pairs) {
         max_num_pairs = num_pairs;
         longest_glyph = ix;
      }
      printf ("%5d%3d%s\n", ix, num_pairs, _occidental_hershey_glyphs[ix]);
   }
   printf ("longest glyph: %d\n", longest_glyph);
   printf ("max num pairs: %d\n", max_num_pairs);
}

Here's the makefile:

extract_gp_occ: extract_gp_occ.c
	touch sys-defines.h
	touch extern.h
	cc -o extract_gp_occ extract_gp_occ.c g_her_glyph.c
	rm -f sys-defines.h
	rm -f extern.h

clean:
	rm -f extract_gp_occ

I won't reproduce the contents of the very long file data_glyphs_occidental.txt in the text here.

Exploring Dr. Hershey's Typography
CircuitousRoot