Updates cpdf to use trunk camlpdf AFM reader

This commit is contained in:
John Whitington 2016-11-01 19:00:19 +00:00
parent 818c462c60
commit 4ade9ab7ed
1 changed files with 6 additions and 2 deletions

View File

@ -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")