Skip to content

Commit

Permalink
Merge pull request #62 from gfngfn/fix-decoding-of-cid-font-version
Browse files Browse the repository at this point in the history
Allow integers for `CIDFontVersion`
gfngfn authored Nov 6, 2024

Verified

This commit was signed with the committer’s verified signature.
Lohann Lohann Paterno Coutinho Ferreira
2 parents c11304c + 35ed77a commit 41a8053
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
@@ -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 =

0 comments on commit 41a8053

Please sign in to comment.