Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how to decode Format 0 subtables of kern tables #53

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/decodeKern.ml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ let rec d_kerning_tables i t p acc =
let (do_fold, acc) = t acc kern_info in
if do_fold then
d_uint16 >>= fun nPairs ->
d_skip 6 >>= fun () ->
(* Skips `searchRange`, `entrySelector`, and `rangeShift` *)
d_kerning_pairs nPairs p acc >>= fun acc ->
d_kerning_tables (i - 1) t p acc
else
Expand All @@ -90,7 +92,7 @@ let fold t p acc ikern =
let dec =
let open DecodeOperation in
(* Only the Windows version of `kern` Table is supported;
the Apple version, which has a 32-bit version number, *)
the Apple version, which has a 32-bit version number, is not. *)
d_uint16 >>= fun version ->
match version with
| 0 ->
Expand Down
Loading