New font strategy for 10_001

This commit is contained in:
John Whitington 2025-01-28 16:39:10 +08:00
parent ef9efc8406
commit ac9f965ac9
3 changed files with 3 additions and 3 deletions

View File

@ -268,7 +268,7 @@ let list_font pdf page (name, dict) =
| Some (Pdf.Name n) -> Pdfwrite.string_of_pdf (Pdf.Name n)
| _ -> ""
in
(page, name, subtype, basefont, encoding, Pdf.Null)
(page, name, subtype, basefont, encoding, Pdf.direct pdf dict)
(* List the fonts used in an xobject, and in any of the xobjects it has. Do not
process an xobject twice. *)

View File

@ -5,7 +5,7 @@
(** Print font list to stdout *)
val print_fonts : ?json:bool -> Pdf.t -> int list -> unit
(** Return font list. Page number, name, subtype, basefont, encoding. *)
(** Return font list. Page number, name, subtype, basefont, encoding, font (direct). *)
val list_fonts : Pdf.t -> int list -> (int * string * string * string * string * Pdf.pdfobject) list
(** Return font list in JSON format *)

View File

@ -468,7 +468,7 @@ let matterhorn_10_001 _ _ pdf =
if not (List.for_all (mem' allowed_names) names) then merror ()
in
let check_font font =
Printf.printf "Check font: %s\n" (Pdfwrite.string_of_pdf font);
(*Printf.printf "Check font: %s\n" (Pdfwrite.string_of_pdf font);*)
match Pdf.lookup_direct pdf "/ToUnicode" font with
| Some _ -> (* a) *) ()
| _ ->