From 8efd78a46fdbb565c87e1031ca97ebd2d6185482 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Mon, 1 May 2023 16:53:28 +0100 Subject: [PATCH] more --- cpdfdraw.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpdfdraw.ml b/cpdfdraw.ml index beb65cf..ed6cc20 100644 --- a/cpdfdraw.ml +++ b/cpdfdraw.ml @@ -80,6 +80,8 @@ let fresh_font_name pdf f = Hashtbl.add fonts n (Pdf.Indirect (Pdftext.write_font pdf f)); n +let process_specials s = s + let rec ops_of_drawop pdf = function | Push -> [Pdfops.Op_q] | Pop -> [Pdfops.Op_Q] @@ -143,7 +145,7 @@ let rec ops_of_drawop pdf = function | ET -> [Pdfops.Op_ET] | Text s -> let charcodes = - implode (map char_of_int (option_map (Pdftext.charcode_extractor_of_font_real !current_font) (Pdftext.codepoints_of_utf8 s))) + implode (map char_of_int (option_map (Pdftext.charcode_extractor_of_font_real !current_font) (Pdftext.codepoints_of_utf8 (process_specials s)))) in [Pdfops.Op_Tj charcodes] | Leading f -> [Pdfops.Op_TL f]