diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 44ed3c4..86bf995 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1821,6 +1821,8 @@ let loadttf n = with _ -> error "addtff: could not load TTF" +let () = Cpdfdrawcontrol.loadttf := loadttf + let setstderrtostdout () = Pdfe.logger := (fun s -> print_string s; flush stdout) diff --git a/cpdfdrawcontrol.ml b/cpdfdrawcontrol.ml index a1933b4..473175d 100644 --- a/cpdfdrawcontrol.ml +++ b/cpdfdrawcontrol.ml @@ -8,10 +8,11 @@ let getfontname = ref (fun () -> Printf.printf "BAD ***\n%!"; "") let getfontsize = ref (fun () -> Printf.printf "BAD ****\n%!"; 0.) let setfontname = ref (fun _ -> Printf.printf "BAD *****\n%!"; ()) let setfontsize = ref (fun _ -> Printf.printf "BAD ******\n%!"; ()) +let loadttf = ref (fun _ -> Printf.printf "BAD *******\n%!"; ()) let ttfs = null_hash () -let loadttf name filename = () +let loadttfseparate name filename = !loadttf (name ^ "=" ^ filename) let fontpack_initialised = ref false diff --git a/cpdfdrawcontrol.mli b/cpdfdrawcontrol.mli index e73e749..27120af 100644 --- a/cpdfdrawcontrol.mli +++ b/cpdfdrawcontrol.mli @@ -5,7 +5,8 @@ val setfontname : (string -> unit) ref val setfontsize : (float -> unit) ref val setdrawing : (unit -> unit) ref val ttfs : (string, (string * Cpdfembed.cpdffont)) Hashtbl.t -val loadttf : string -> string -> unit +val loadttf : (string -> unit) ref +val loadttfseparate : string -> string -> unit val fontpack_initialised : bool ref val drawops : (string * Cpdfdraw.drawops list) list ref val addop : Cpdfdraw.drawops -> unit