Disambiguate addtext error messages

This commit is contained in:
John Whitington 2015-05-31 16:31:08 +01:00
parent 25668ecfe8
commit a2bece3878
1 changed files with 2 additions and 2 deletions

View File

@ -1631,9 +1631,9 @@ let addtext
| Some fontdict -> | Some fontdict ->
begin match Pdf.lookup_direct pdf fontname fontdict with begin match Pdf.lookup_direct pdf fontname fontdict with
| Some font -> font | Some font -> font
| _ -> failwith "addtext: bad font" | _ -> failwith "addtext: bad font A"
end end
| _ -> failwith "addtext: bad font" | _ -> failwith "addtext: bad font B"
in in
let rawwidth = width_of_text (Pdftext.read_font pdf font) text in let rawwidth = width_of_text (Pdftext.read_font pdf font) text in
(rawwidth *. fontsize) /. 1000. (rawwidth *. fontsize) /. 1000.