From 2bd7aed6b8c312c0e59c97dc57226f8a7aa32691 Mon Sep 17 00:00:00 2001 From: Takashi Suwa Date: Sat, 30 Sep 2023 01:56:43 +0900 Subject: [PATCH] fix how to decode Format 0 subtables of `kern` tables --- src/decodeKern.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/decodeKern.ml b/src/decodeKern.ml index a13b783..7b6dedf 100644 --- a/src/decodeKern.ml +++ b/src/decodeKern.ml @@ -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 @@ -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 ->