Fix font choosing regression in v2.5

This commit is contained in:
John Whitington 2022-01-31 12:36:31 +00:00
parent 97cd4c39c5
commit 84841250eb
1 changed files with 5 additions and 1 deletions

View File

@ -1095,7 +1095,11 @@ let setfont f =
| Some x -> StandardFont x | Some x -> StandardFont x
| None -> OtherFont (convert f) | None -> OtherFont (convert f)
end; end;
args.fontname <- convert f args.fontname <-
begin match Pdftext.standard_font_of_name ("/" ^ f) with
| Some x -> f
| None -> convert f
end
let setextracttextfontsize f = let setextracttextfontsize f =
args.extract_text_font_size <- Some f args.extract_text_font_size <- Some f