diff --git a/cpdfcommand.ml b/cpdfcommand.ml index f4aa2e0..6a2b06c 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1827,6 +1827,8 @@ let setdraw () = let () = Cpdfdrawcontrol.getfontname := fun () -> args.fontname let () = Cpdfdrawcontrol.getfontsize := fun () -> args.fontsize +let () = Cpdfdrawcontrol.setfontname := setfont +let () = Cpdfdrawcontrol.setfontsize := fun s -> args.fontsize <- s (* Parse a control file, make an argv, and then make Arg parse it. *) let rec make_control_argv_and_parse filename = diff --git a/cpdfdrawcontrol.ml b/cpdfdrawcontrol.ml index 87e4432..319b14e 100644 --- a/cpdfdrawcontrol.ml +++ b/cpdfdrawcontrol.ml @@ -5,6 +5,8 @@ open Cpdferror let embed_font = ref (fun () -> Cpdfembed.ExistingNamedFont) let getfontname = ref (fun () -> "") let getfontsize = ref (fun () -> 0.) +let setfontname = ref (fun _ -> ()) +let setfontsize = ref (fun _ -> ()) let ttfs = null_hash () diff --git a/cpdfdrawcontrol.mli b/cpdfdrawcontrol.mli index d2da532..f7ddb0f 100644 --- a/cpdfdrawcontrol.mli +++ b/cpdfdrawcontrol.mli @@ -1,6 +1,8 @@ val embed_font : (unit -> Cpdfembed.cpdffont) ref val getfontname : (unit -> string) ref val getfontsize : (unit -> float) ref +val setfontname : (string -> unit) ref +val setfontsize : (float -> unit) ref val ttfs : (string, (string * Cpdfembed.cpdffont)) Hashtbl.t val fontpack_initialised : bool ref val drawops : (string * Cpdfdraw.drawops list) list ref