Clear font cache on initialisation

This commit is contained in:
John Whitington 2023-07-21 15:21:09 +01:00
parent 620f90eb82
commit d1236186cc
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ let used pdf fastrefnums labels title marks =
CropBox. Font size of title twice body font size. Null page labels added for CropBox. Font size of title twice body font size. Null page labels added for
TOC, others bumped up and so preserved. *) TOC, others bumped up and so preserved. *)
let typeset_table_of_contents ~font ~fontsize ~title ~bookmark pdf = let typeset_table_of_contents ~font ~fontsize ~title ~bookmark pdf =
Hashtbl.clear width_table_cache;
let marks = Pdfmarks.read_bookmarks pdf in let marks = Pdfmarks.read_bookmarks pdf in
if marks = [] then (Pdfe.log "No bookmarks, not making table of contents\n"; pdf) else if marks = [] then (Pdfe.log "No bookmarks, not making table of contents\n"; pdf) else
let labels = Pdfpagelabels.read pdf in let labels = Pdfpagelabels.read pdf in