のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

setsnap

sub ShowUsage {
  print STDOUT &fix(<<ENDUSAGE);
  setsnap.pl Version 02/16/2018
  setsnap.pl [-u] [-h]
  setsnap.pl < stemHist-generated-stemwidth-reports
  setsnap.pl -s [-n] < stemHist-generated-stemwidth-reports
  setsnap.pl [-o [-b<bot_pt_size>] [-t<top_pt_size>] [-r<dpi>]] [-n] < stemHist-generated-stemwidth-reports
  Calculates highest-frequency or optimal stem width values in one or more
  stemHist-generated stemwidth reports.
ENDUSAGE
}

sub ShowHelp {
  print STDOUT &fix(<<ENDHELP);
  OPTIONS:
   -u = Displays only the version and command-line options
   -h = Displays this help page

   -o = Calculate optimal values based on point size range and resolution
   -b = Bottom (lower) end of point size range; 
           used only with '-o' option
   -t = Top (upper) end of point size range; 
           used only with '-o' option
   -r = Resolution expressed in dpi; 
           used only with '-o' option

   -n = Disables the writing of a newline character
           (this is useful when executing from another script)

   -s = Writes to STDOUT a new stemHist output file that includes only the
        stem counts and their widths in decreasing stem-count order
       (this is useful when concatenating multiple stemHist output files)

       When no options are used, 
       the highest-frequency stem width value is reported, 
       along with its frequency in parentheses.

        When the '-o' option is used, 
        the '-b', '-t', and '-r' options can also be used, 
        and their default values are 9 (points), 24 (points), and 72 (dpi),
        respectively. 

      The optimal value is output in brackets, followed by secondary
        and tertiary values.
ENDHELP

perl-scripts/setsnap.pl at master · adobe-type-tools/perl-scripts · GitHub

psstemhist

This program is actually the same tool as psautohint but with a different face. It provides reports which help in selecting the global hint data and alignment zones for Type 1 hinting. You should look at the reports from this tool in order to select the most common stem widths, and then use a program such as FontLab or RoboFont to set the values in the font. This should be done before hinting the font. Works with Type 1 and OpenType/CFF fonts only.