A brief explanation of how to use and maintain these scripts -

A. Installation.

1. Install the necessary perl dependencies:

What is really needed is the ttf2config.pl script from Font::TTF::Scripts,
but that is shipped in the Examples/ directory and needs to be manually
installed - I do that after installing the rest of that package.  The scripts
have a dependency of Font:TTF, which needs IO::String.  The scripts also
provide 'fret' which can be used to make a PDF of what is in a TTF (but not
w hat i s in an OTF) - it has a runtime dependency of Text::PDF.

2. Compile and install get_codepoints - that provides a way to query
fontconfig for what is in  a font.

3. If you want to look at what is in a ttc (TrueType Collection), install
fontforge.  You can then use that to open the ttc, select one of the fonts
within it, and then generate a ttf font.  You do not need to include bitmaps.
Do not install this generated ttf, only the ttc.  NB - I have found at least
one ttc, of unspecified provenance, which fontforge could not understand.

B. Use.

1. The font you wish to look at needs to be installed, so that fc-cache can see
it.

2. Run create-codepoint-files with the path to the ttf or otf file.  If this
font is part of a ttc, point to the ttf you generated in fontforge.

3. If appropriate, rename the codepoint and coverage files (e.g. I rename the
Baekmuk fonts such as batang to Baekmuk-Batang).

4. Run generate-all-characters on the codepoint file.  This writes to stdout,
I send the output to filename.txt.

5. Open filename.txt in libreoffice writer, then for a font including all the
digits and the latin alphabet, commas, full-stop 'select all' and change the
font and the size - for creating a PDF, 10pt is fine because you can zoom in
with a decent PDF viewer.  For fonts which only support a non-latin script
you can theoretically do the same and let fontconfig decide what font to use
for the missing (latin) glyphs - or you can do just the glyphs in the font,
line-by-line.  I do that - for whole rows, so spaces for missing glyphs are
replaced by spaces from whichever font fontconfig chooses.

6. Save the file as .odt (in case you need to change anything later), then
export it as a PDF.  I call these filename-contents.PDF.

7. After that, whatever else you find useful - I use xelatex to create a
filename-languages.PDF, review what the font is good for, and then create
a cut-down PDF for that particular-font.  For comparisons of similar fonts,
in latin in serif and sans I use tex's lipsum package, for everything else
I use hardcoded text - some of it is probably gibberish, but that seems
appropriate (dummy text is not supposed to be sensible).

C. Maintenance.

1. If you want to look at a ttc, you need to add the name(s) of the ttf files
you created into create-codepoint-files in check_if_ttc : both the name of the
ttf, and what it is called in fc-list (make sure you pick the correct member of
the ttc!).

2. Whenever there is a new unicode version (it looks as if this will now happen
annually) you will need to get the new Blocks.txt file.  Then use list-blocks to
work out what needs to be changed in unicode-blocks (that needs a calculator to
check the decimal values) and then run check-blocks to confirm that the data is
consistent.  Rinse, repeat until consistent.  This is a PITA, perhaps things can
be revised to process Blocks.txt.  The current scripts should be up to date for
Unicode-8.0, but 9.0 was released a couple of months ago.

Share and enjoy!

