mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-06-05 22:09:39 +02:00
Better font error message
This commit is contained in:
@ -1093,7 +1093,9 @@ let setfont f =
|
|||||||
args.font <-
|
args.font <-
|
||||||
begin match Pdftext.standard_font_of_name ("/" ^ f) with
|
begin match Pdftext.standard_font_of_name ("/" ^ f) with
|
||||||
| Some x -> StandardFont x
|
| Some x -> StandardFont x
|
||||||
| None -> OtherFont (convert f)
|
| None ->
|
||||||
|
if f <> "" && hd (explode f) <> '/' then error "Custom font names must begin with /";
|
||||||
|
OtherFont (convert f)
|
||||||
end;
|
end;
|
||||||
args.fontname <-
|
args.fontname <-
|
||||||
begin match Pdftext.standard_font_of_name ("/" ^ f) with
|
begin match Pdftext.standard_font_of_name ("/" ^ f) with
|
||||||
|
Reference in New Issue
Block a user