From 00ba9d4bee02af25fc6d0a8b0fe5ec1956035142 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 21 Sep 2022 16:18:35 +0100 Subject: [PATCH] more --- cpdftype.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpdftype.ml b/cpdftype.ml index 8f3f02a..8079437 100644 --- a/cpdftype.ml +++ b/cpdftype.ml @@ -56,13 +56,13 @@ let initial_state () = let font_widths f fontsize = match f with - | Pdftext.StandardFont (sf, _) -> + | Pdftext.StandardFont (sf, encoding) -> Array.init 256 (fun x -> fontsize *. 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.) | Pdftext.SimpleFont {fontmetrics = Some m} -> Array.map (fun x -> fontsize *. x /. 1000. ) m