From c04bc7f0bcbd0e5f67c35b76ff64348094649c4e Mon Sep 17 00:00:00 2001 From: Geographic Data Center Date: Tue, 24 May 2016 10:01:02 -0700 Subject: [PATCH] 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 --- table_demo | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/table_demo b/table_demo index b43589d..5069de1 100755 --- a/table_demo +++ b/table_demo @@ -49,8 +49,11 @@ try { // all paths in 'searchpath' need to be inside curly braces // multiple curly-braced paths in $searchpath need to be separated with // space characters - $searchpath = '{/usr/share/fonts/dejavu/}{' . __DIR__ . '/fonts}'; - $pdf->set_option("searchpath={" . $searchpath . "}"); + $searchpath = '{/usr/share/fonts/gnu-free/} {' . __DIR__ . '/fonts}'; + #print "Font search path: $searchpath\n"; + $pdf->set_option("SearchPath={" . $searchpath . "}"); + $pdf->set_option("enumeratefonts saveresources={filename=" + . __DIR__ . "/fonts.upr}"); if ($pdf->begin_document($outfile, "") == 0) throw new Exception("Error: " . $pdf->get_errmsg()); -- 1.9.1