From 4ac9e7c61e5fc6575190a3c9449b6e9b3eeed7d6 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 29 Sep 2022 14:48:34 +0100 Subject: [PATCH] more --- cpdfembed.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpdfembed.ml b/cpdfembed.ml index 0e9f8db..de2afa6 100644 --- a/cpdfembed.ml +++ b/cpdfembed.ml @@ -56,16 +56,16 @@ let embed_truetype pdf ~fontfile ~fontname ~codepoints ~encoding = in let f = Cpdftruetype.parse ~subset:accepted_unicodepoints fontfile ~encoding in let name_1 = basename () in + let module TT = Cpdftruetype in let fontfile = - let len = Pdfio.bytes_size fontfile in + let len = Pdfio.bytes_size f.TT.subset in Pdf.Stream {contents = (Pdf.Dictionary [("/Length", Pdf.Integer len); ("/Length1", Pdf.Integer len)], - Pdf.Got fontfile)} + Pdf.Got f.TT.subset)} in let fontfile_num = Pdf.addobj pdf fontfile in - let module TT = Cpdftruetype in let open Pdftext in let fontmetrics = let a = Array.make 256 0. in