[CBDT] Implement Format18 get_extens

Part of https://github.com/harfbuzz/harfbuzz/issues/1327
This commit is contained in:
Behdad Esfahbod 2018-10-30 13:16:07 -07:00
parent a2a7422aaf
commit dc9bd29fea
1 changed files with 9 additions and 1 deletions

View File

@ -437,8 +437,16 @@ struct CBDT
const GlyphBitmapDataFormat17& glyphFormat17 = const GlyphBitmapDataFormat17& glyphFormat17 =
StructAtOffset<GlyphBitmapDataFormat17> (this->cbdt, image_offset); StructAtOffset<GlyphBitmapDataFormat17> (this->cbdt, image_offset);
glyphFormat17.glyphMetrics.get_extents (extents); glyphFormat17.glyphMetrics.get_extents (extents);
break;
}
case 18: {
if (unlikely (image_length < GlyphBitmapDataFormat18::min_size))
return false;
const GlyphBitmapDataFormat18& glyphFormat18 =
StructAtOffset<GlyphBitmapDataFormat18> (this->cbdt, image_offset);
glyphFormat18.glyphMetrics.get_extents (extents);
break;
} }
break;
default: default:
// TODO: Support other image formats. // TODO: Support other image formats.
return false; return false;