more
This commit is contained in:
parent
0a67734f1c
commit
3af58990e8
|
@ -50,7 +50,6 @@ let string_of_encoding = function
|
||||||
| Pdftext.StandardEncoding -> "/StandardEncoding"
|
| Pdftext.StandardEncoding -> "/StandardEncoding"
|
||||||
| _ -> failwith "unknown encoding"
|
| _ -> failwith "unknown encoding"
|
||||||
|
|
||||||
(* FIXME add "" = full subset *)
|
|
||||||
let embed_truetype pdf ~fontfile ~fontname ~text ~encoding =
|
let embed_truetype pdf ~fontfile ~fontname ~text ~encoding =
|
||||||
let unicodepoints = Pdftext.codepoints_of_utf8 text in
|
let unicodepoints = Pdftext.codepoints_of_utf8 text in
|
||||||
let glyphlist_table = Pdfglyphlist.reverse_glyph_hashes () in
|
let glyphlist_table = Pdfglyphlist.reverse_glyph_hashes () in
|
||||||
|
|
|
@ -195,7 +195,7 @@ let calculate_widths firstchar lastchar subset (cmapdata : (int, int) Hashtbl.t)
|
||||||
(fun pos ->
|
(fun pos ->
|
||||||
let code = pos + firstchar in
|
let code = pos + firstchar in
|
||||||
if !dbg then Printf.printf "code %i --> " code;
|
if !dbg then Printf.printf "code %i --> " code;
|
||||||
if not (mem code subset) then 0 else
|
if subset <> [] && not (mem code subset) then 0 else
|
||||||
try
|
try
|
||||||
let glyphnum = Hashtbl.find cmapdata code in
|
let glyphnum = Hashtbl.find cmapdata code in
|
||||||
if !dbg then Printf.printf "glyph number %i --> " glyphnum;
|
if !dbg then Printf.printf "glyph number %i --> " glyphnum;
|
||||||
|
|
Loading…
Reference in New Issue