This commit is contained in:
John Whitington 2022-10-04 18:55:06 +01:00
parent a671c032cc
commit ca2f5f1621
2 changed files with 3 additions and 3 deletions

View File

@ -201,7 +201,7 @@ let extract_fontfile pagenumber fontname pdf =
match Pdf.lookup_direct pdf "/Font" resources with
| None -> failwith "extract_fontfile: font not found"
| Some fonts ->
let fontobj = Pdf.lookup_fail "no /Fonts" pdf fontname fonts in
let fontobj = Pdf.lookup_fail ("no font " ^ fontname) pdf fontname fonts in
let font = Pdftext.read_font pdf fontobj in
match font with
| Pdftext.CIDKeyedFont (_, {Pdftext.cid_fontdescriptor = {Pdftext.fontfile = Some fontfile}}, _)

View File

@ -299,9 +299,9 @@ let remove_unneeded_tables major minor tables indexToLocFormat subset encoding c
Array.iter
(fun (tag, _, _, _) ->
if !dbg then Printf.printf "Writing %s table\n" (string_of_tag tag);
if string_of_tag tag = "loca" then
(*if string_of_tag tag = "loca" then
write_loca_table subset cmap indexToLocFormat bs loca
else
else*)
match findtag tag with
| (og_off, Some len) ->
let b = mk_b (i32toi og_off) in