From c0a7c14e2e9b5c9d40f03f26939b5d07939a0aa0 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 12 Jul 2023 16:20:10 +0100 Subject: [PATCH] Fix /Width non-subset entries --- cpdftruetype.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cpdftruetype.ml b/cpdftruetype.ml index c7e9f20..2e58bbf 100644 --- a/cpdftruetype.ml +++ b/cpdftruetype.ml @@ -2,8 +2,6 @@ open Pdfutil open Pdfio -(* FIXME revisit widths for mono font - the new code returning the notdef width is making the notdef width turn up in /Widths, where missing entries should be 0! *) - let dbg = (* Pdfe.logger := (fun s -> print_string s; flush stdout) *) ref false @@ -346,7 +344,7 @@ let calculate_widths unitsPerEm encoding firstchar lastchar subset cmapdata hmtx if !dbg then Printf.printf "code %i --> " code; let code = unicode_codepoint_of_pdfcode encoding_table glyphlist_table code in if !dbg then Printf.printf "unicode %i --> " code; - if not (mem code subset) then hmtxdata.(0) else + if not (mem code subset) then 0 else try let glyphnum = Hashtbl.find cmapdata code in if !dbg then Printf.printf "glyph number %i --> " glyphnum;