Commit c04bc7f0bcbd0e5f67c35b76ff64348094649c4e

Authored by Geographic Data Center
1 parent 913794bed7

table_demo: fix font search paths

- Set a flag in PDFlib that causes it to save font info to a file, so it can be
  examined after the script has been run

Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff

... ... @@ -49,8 +49,11 @@
49 49 // all paths in 'searchpath' need to be inside curly braces
50 50 // multiple curly-braced paths in $searchpath need to be separated with
51 51 // space characters
52   - $searchpath = '{/usr/share/fonts/dejavu/}{' . __DIR__ . '/fonts}';
53   - $pdf->set_option("searchpath={" . $searchpath . "}");
  52 + $searchpath = '{/usr/share/fonts/gnu-free/} {' . __DIR__ . '/fonts}';
  53 + #print "Font search path: $searchpath\n";
  54 + $pdf->set_option("SearchPath={" . $searchpath . "}");
  55 + $pdf->set_option("enumeratefonts saveresources={filename="
  56 + . __DIR__ . "/fonts.upr}");
54 57  
55 58 if ($pdf->begin_document($outfile, "") == 0)
56 59 throw new Exception("Error: " . $pdf->get_errmsg());