From 8ded8853f228a3bddc5eba7afbc3c16e980b691b Mon Sep 17 00:00:00 2001 From: John Whitington Date: Mon, 17 Jul 2023 12:40:49 +0100 Subject: [PATCH] Correct TTF fontname from cpdfcommand.ml --- cpdfcommand.ml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 2a7e9fc..e55d178 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1728,9 +1728,10 @@ let setidironlypdfs () = let setnowarnrotate () = args.no_warn_rotate <- true - let setfontttf s = - args.font <- EmbeddedFont s + let fontname, _ = Hashtbl.find ttfs s in + args.font <- EmbeddedFont s; + args.fontname <- fontname let setfontttfencoding s = args.fontencoding <- @@ -1759,9 +1760,6 @@ let addop o = | (n, ops)::t -> drawops := (n, (o::ops))::t | [] -> error "no drawops" - - - let endxobj () = match !drawops with | (n, ops)::t ->