This commit is contained in:
John Whitington 2022-09-21 16:18:35 +01:00
parent 3237daebb7
commit 00ba9d4bee
1 changed files with 2 additions and 2 deletions

View File

@ -56,13 +56,13 @@ let initial_state () =
let font_widths f fontsize = let font_widths f fontsize =
match f with match f with
| Pdftext.StandardFont (sf, _) -> | Pdftext.StandardFont (sf, encoding) ->
Array.init Array.init
256 256
(fun x -> (fun x ->
fontsize fontsize
*. float_of_int *. float_of_int
(Pdfstandard14.textwidth false Pdftext.WinAnsiEncoding sf (string_of_char (char_of_int x))) (Pdfstandard14.textwidth false encoding sf (string_of_char (char_of_int x)))
/. 1000.) /. 1000.)
| Pdftext.SimpleFont {fontmetrics = Some m} -> | Pdftext.SimpleFont {fontmetrics = Some m} ->
Array.map (fun x -> fontsize *. x /. 1000. ) m Array.map (fun x -> fontsize *. x /. 1000. ) m