diff --git a/cpdf.ml b/cpdf.ml index 770909f..d94599b 100644 --- a/cpdf.ml +++ b/cpdf.ml @@ -1608,7 +1608,11 @@ let extract_widths_firstlast width_data = match sorted, rev sorted with (first, _)::_, (last, _)::_ -> for x = first to last do - if not (Hashtbl.mem width_data x) then Hashtbl.add width_data x 0 + if not (Hashtbl.mem width_data x) then + begin + Printf.printf "Failed to find width for char %i\n" x; + Hashtbl.add width_data x 0 + end done; (first, last, map snd (List.sort compare (list_of_hashtbl width_data))) @@ -1616,7 +1620,7 @@ let extract_widths_firstlast width_data = let make_font embed fontname = let font = unopt (Pdftext.standard_font_of_name ("/" ^ fontname)) in - let header, width_data, _ = Pdfstandard14.afm_data font in + let header, width_data, _, _ = Pdfstandard14.afm_data font in (* Print out the width data *) (*Hashtbl.iter (Printf.printf "%i -> %i\n")