From 87cf09bd2c7b7bb001a974296de13617a34e6627 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 3 Jun 2023 21:00:56 -0600 Subject: [PATCH] [subset/loca] Fix up for retaingid null glyphs at the end We currently don't have those, but in case we add. --- src/OT/glyf/glyf-helpers.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/OT/glyf/glyf-helpers.hh b/src/OT/glyf/glyf-helpers.hh index 844784045..d0a5a132f 100644 --- a/src/OT/glyf/glyf-helpers.hh +++ b/src/OT/glyf/glyf-helpers.hh @@ -44,6 +44,12 @@ _write_loca (IteratorIn&& it, last++; // Skip over gid } + unsigned num_glyphs = num_offsets - 1; + for (; last < num_glyphs; last++) + { + DEBUG_MSG (SUBSET, nullptr, "loca entry empty offset %u", offset); + *dest++ = value; + } } static bool