[glyf] Empty glyphs need no padding

This commit is contained in:
Behdad Esfahbod 2023-06-01 20:20:00 -06:00
parent 73c18d1d42
commit 65a7d8c6f0

View file

@ -29,17 +29,7 @@ struct SubsetGlyph
if (length () == 0)
{
/* Fast path for retain-gid holes. */
unsigned int pad_length = use_short_loca ? padding () : 0;
DEBUG_MSG (SUBSET, nullptr, "serialize empty glyph, pad %u", pad_length);
HBUINT8 pad;
pad = 0;
while (pad_length > 0)
{
c->embed (pad);
pad_length--;
}
DEBUG_MSG (SUBSET, nullptr, "serialize empty glyph");
return true;
}