From c8380bd3e4a2e51dfbe2e44e19738445be16ac75 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 28 Oct 2018 15:20:33 -0700 Subject: [PATCH] [color] Remove more dump-emoji cruft --- src/hb-ot-color-cbdt-table.hh | 53 ----------------------------------- src/hb-ot-color-sbix-table.hh | 13 --------- 2 files changed, 66 deletions(-) diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh index f744e1a6a..467159c7c 100644 --- a/src/hb-ot-color-cbdt-table.hh +++ b/src/hb-ot-color-cbdt-table.hh @@ -451,59 +451,6 @@ struct CBDT return true; } - inline void dump (void (*callback) (const uint8_t* data, unsigned int length, - unsigned int group, unsigned int gid)) const - { - if (!cblc) - return; // Not a color bitmap font. - - for (unsigned int i = 0; i < cblc->sizeTables.len; ++i) - { - const BitmapSizeTable &sizeTable = cblc->sizeTables[i]; - const IndexSubtableArray &subtable_array = cblc+sizeTable.indexSubtableArrayOffset; - for (unsigned int j = 0; j < sizeTable.numberOfIndexSubtables; ++j) - { - const IndexSubtableRecord &subtable_record = subtable_array.indexSubtablesZ[j]; - for (unsigned int gid = subtable_record.firstGlyphIndex; - gid <= subtable_record.lastGlyphIndex; ++gid) - { - unsigned int image_offset = 0, image_length = 0, image_format = 0; - - if (!subtable_record.get_image_data (gid, &subtable_array, - &image_offset, &image_length, &image_format)) - continue; - - switch (image_format) - { - case 17: { - const GlyphBitmapDataFormat17& glyphFormat17 = - StructAtOffset (this->cbdt, image_offset); - callback ((const uint8_t *) &glyphFormat17.data.arrayZ, - glyphFormat17.data.len, i, gid); - } - break; - case 18: { - const GlyphBitmapDataFormat18& glyphFormat18 = - StructAtOffset (this->cbdt, image_offset); - callback ((const uint8_t *) &glyphFormat18.data.arrayZ, - glyphFormat18.data.len, i, gid); - } - break; - case 19: { - const GlyphBitmapDataFormat19& glyphFormat19 = - StructAtOffset (this->cbdt, image_offset); - callback ((const uint8_t *) &glyphFormat19.data.arrayZ, - glyphFormat19.data.len, i, gid); - } - break; - default: - continue; - } - } - } - } - } - inline hb_blob_t* reference_png (hb_codepoint_t glyph_id, unsigned int x_ppem, unsigned int y_ppem) const diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index 2f33bf6c4..79f79a5af 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -161,19 +161,6 @@ struct sbix inline bool has_data () const { return sbix_len; } - /* only to support dump-emoji, don't use it anywhere else */ - inline unsigned int *get_available_ppems (unsigned int *length) - { - if (unlikely (table->strikes.len == 0)) - return nullptr; - *length = table->strikes.len; - unsigned int *result; - result = (unsigned int *) malloc (sizeof (unsigned int) * table->strikes.len); - for (unsigned int i = 0; i < table->strikes.len; i++) - result[i] = (table+table->strikes[i]).get_ppem (); - return result; - } - inline bool get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const