Skip to content

Commit

Permalink
allow integers for CIDFontVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
gfngfn committed Nov 6, 2024
1 parent c11304c commit 35ed77a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/decodeCff.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ let get_integer dict key =
let get_real_with_default dictmap key default =
let open ResultMonad in
match DictMap.find_opt key dictmap with
| Some(Real(r) :: []) -> return r
| Some(_) -> err Error.NotARealInDict
| None -> return default
| Some(Integer(i) :: []) -> return @@ float_of_int i
| Some(Real(r) :: []) -> return r
| Some(_) -> err Error.NotARealInDict
| None -> return default


let get_integer_pair_opt dictmap key =
Expand Down

0 comments on commit 35ed77a

Please sign in to comment.