Getting closer to first truetype fix

This commit is contained in:
John Whitington 2023-06-16 16:11:06 +01:00
parent 9f5e672317
commit b56b147541
1 changed files with 16 additions and 11 deletions

View File

@ -624,9 +624,14 @@ let parse ?(subset=[]) data encoding =
let second_tounicode = let second_tounicode =
if subset = [] then None else if subset = [] then None else
let h = null_hash () in let h = null_hash () in
let s = (implode (tl (tl (explode (Pdftext.utf16be_of_codepoints (tl subset)))))) in (*let s = (implode (tl (tl (explode (Pdftext.utf16be_of_codepoints (tl subset)))))) in*)
Printf.printf "String for tounicode = %S\n" s; (*Printf.printf "String for tounicode = %S\n" s;*)
Hashtbl.add h 0 s; List.iter2
(fun n u ->
let s = implode (tl (tl (explode (Pdftext.utf16be_of_codepoints [u])))) in
Hashtbl.add h n s)
(indx subset_2)
subset_2;
Some h Some h
in in
Printf.printf "returning the fonts. Job done.\n"; Printf.printf "returning the fonts. Job done.\n";