Beginning on fontpacks for -add-text
This commit is contained in:
parent
14bfc8b6c3
commit
f5c47c926c
|
@ -523,14 +523,14 @@ let
|
|||
!pdf;
|
||||
voffset := !voffset +. (linespacing *. fontsize))
|
||||
lines;
|
||||
(*begin match cpdffont with
|
||||
begin match cpdffont with
|
||||
| Cpdfembed.EmbedInfo {fontfile; fontname; encoding} ->
|
||||
let codepoints = map fst (list_of_hashtbl used) in
|
||||
let objnum = match fontpdfobj with Pdf.Indirect i -> i | _ -> failwith "bad fontpdfobj" in
|
||||
let font = hd (fst (Cpdfembed.embed_truetype !pdf ~fontfile ~fontname ~codepoints ~encoding)) in
|
||||
ignore (Pdftext.write_font ~objnum !pdf font)
|
||||
| _ -> ()
|
||||
end;*)
|
||||
end;
|
||||
!pdf
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
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
|
||||
|
@ -288,7 +290,7 @@ let write_glyf_table subset cmap bs mk_b glyfoffset loca =
|
|||
Not_found -> ())
|
||||
subset;
|
||||
let locnums = (*expand_composites mk_b loca glyfoffset*) (sort compare (map fst (list_of_hashtbl locnums))) in
|
||||
(*if !dbg then*)
|
||||
if !dbg then
|
||||
(Printf.printf "We want glyfs for locations: ";
|
||||
iter (Printf.printf "%i ") locnums; Printf.printf "\n");
|
||||
let byteranges = map (fun x -> (loca.(x), loca.(x + 1))) locnums in
|
||||
|
|
Loading…
Reference in New Issue