This commit is contained in:
John Whitington 2022-09-16 17:26:32 +01:00
parent 3af58990e8
commit be5402ca9b
2 changed files with 2 additions and 2 deletions

View File

@ -2142,7 +2142,6 @@ and specs =
("-embed-missing-fonts",
Arg.Unit (setop EmbedMissingFonts),
" Embed missing fonts by calling gs");
("-twoup",
Arg.Unit (setop TwoUp),
" Put 2 pages onto one");

View File

@ -64,7 +64,8 @@ let font_widths f fontsize =
*. float_of_int
(Pdfstandard14.textwidth false Pdftext.WinAnsiEncoding sf (string_of_char (char_of_int x)))
/. 1000.)
| Pdftext.SimpleFont {fontmetrics = Some m} -> m
| Pdftext.SimpleFont {fontmetrics = Some m} ->
Array.map (fun x -> fontsize *. x /. 1000. ) m
| _ -> raise (Pdf.PDFError "Cpdftype: Unsupported font")
let width_of_string ws s =