[colr] Minor no behavior change

This commit is contained in:
Behdad Esfahbod 2022-12-11 13:04:24 -07:00
parent 7a748ad4ac
commit b3d6a5ef86
1 changed files with 9 additions and 12 deletions

View File

@ -932,16 +932,13 @@ struct ClipBox
{
switch (u.format) {
case 1:
case 2: // TODO variations
extents->x_bearing = u.format1.xMin;
extents->y_bearing = u.format1.yMax;
extents->width = u.format1.xMax - u.format1.xMin;
extents->height = u.format1.yMin - u.format1.yMax;
return true;
case 2:
// TODO
return false;
default:
// This shouldn't happen
return false;
}
}
@ -1078,7 +1075,7 @@ struct ClipList
bool
get_extents (hb_codepoint_t gid, hb_glyph_extents_t *extents) const
{
for (const ClipRecord& record : clips.iter ())
for (auto& record : clips)
{
if (record.startGlyphID <= gid && gid <= record.endGlyphID)
return record.get_extents (extents, this);