This commit is contained in:
John Whitington 2023-05-01 16:53:28 +01:00
parent a8d8f447bf
commit 8efd78a46f
1 changed files with 3 additions and 1 deletions

View File

@ -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]