diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 86bf995..eb9c6fe 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1566,6 +1566,9 @@ let setstayonerror () = let setembedstd14 s = args.embedstd14 <- Some s +let _ = + Cpdfdrawcontrol.setembedstd14 := (fun b dir -> if b then args.embedstd14 <- Some dir else args.embedstd14 <- None) + let sethardbox box = detect_duplicate_op (HardBox box); args.op <- Some (HardBox box) diff --git a/cpdfdrawcontrol.ml b/cpdfdrawcontrol.ml index 473175d..71012df 100644 --- a/cpdfdrawcontrol.ml +++ b/cpdfdrawcontrol.ml @@ -3,12 +3,13 @@ open Pdfutil open Cpdferror let embed_font = ref (fun () -> Printf.printf "BAD *\n%!"; Cpdfembed.ExistingNamedFont) -let setdrawing = ref (fun () -> Printf.printf "BAD **\n%!"; ()) +let setdrawing = ref (fun () -> Printf.printf "BAD **\n%!") 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 setfontname = ref (fun _ -> Printf.printf "BAD *****\n%!") +let setfontsize = ref (fun _ -> Printf.printf "BAD ******\n%!") +let loadttf = ref (fun _ -> Printf.printf "BAD *******\n%!") +let setembedstd14 = ref (fun _ _ -> Printf.printf "BAD ********\n%!") let ttfs = null_hash () diff --git a/cpdfdrawcontrol.mli b/cpdfdrawcontrol.mli index 27120af..2ead90b 100644 --- a/cpdfdrawcontrol.mli +++ b/cpdfdrawcontrol.mli @@ -4,6 +4,7 @@ val getfontsize : (unit -> float) ref val setfontname : (string -> unit) ref val setfontsize : (float -> unit) ref val setdrawing : (unit -> unit) ref +val setembedstd14 : (bool -> string -> unit) ref val ttfs : (string, (string * Cpdfembed.cpdffont)) Hashtbl.t val loadttf : (string -> unit) ref val loadttfseparate : string -> string -> unit