Skip to content

Commit

Permalink
fix how to decode Format 0 subtables of kern tables
Browse files Browse the repository at this point in the history
  • Loading branch information
gfngfn committed Sep 29, 2023
1 parent 0a8974d commit 2bd7aed
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 2bd7aed

Please sign in to comment.