|
|
@ -141,7 +141,8 @@ struct COLR |
|
|
|
const BaseGlyphRecord *record = get_base_glyph_record (glyph); |
|
|
|
const BaseGlyphRecord *record = get_base_glyph_record (glyph); |
|
|
|
if (!record) return; |
|
|
|
if (!record) return; |
|
|
|
|
|
|
|
|
|
|
|
hb_array_t<const LayerRecord> glyph_layers = (this+layersZ).as_array (numLayers).sub_array (record->firstLayerIdx, record->numLayers); |
|
|
|
auto glyph_layers = (this+layersZ).as_array (numLayers).sub_array (record->firstLayerIdx, |
|
|
|
|
|
|
|
record->numLayers); |
|
|
|
if (!glyph_layers.length) return; |
|
|
|
if (!glyph_layers.length) return; |
|
|
|
related_ids->add_array (&glyph_layers[0].glyphId, glyph_layers.length, LayerRecord::min_size); |
|
|
|
related_ids->add_array (&glyph_layers[0].glyphId, glyph_layers.length, LayerRecord::min_size); |
|
|
|
} |
|
|
|
} |
|
|
@ -175,7 +176,7 @@ struct COLR |
|
|
|
|
|
|
|
|
|
|
|
for (const hb_item_type<BaseIterator>& _ : + base_it.iter ()) |
|
|
|
for (const hb_item_type<BaseIterator>& _ : + base_it.iter ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto* record = c->embed(_); |
|
|
|
auto* record = c->embed (_); |
|
|
|
if (unlikely (!record)) return_trace (false); |
|
|
|
if (unlikely (!record)) return_trace (false); |
|
|
|
record->firstLayerIdx = numLayers; |
|
|
|
record->firstLayerIdx = numLayers; |
|
|
|
numLayers += record->numLayers; |
|
|
|
numLayers += record->numLayers; |
|
|
@ -235,7 +236,7 @@ struct COLR |
|
|
|
old_record->firstLayerIdx + old_record->numLayers > numLayers)) |
|
|
|
old_record->firstLayerIdx + old_record->numLayers > numLayers)) |
|
|
|
return hb_pair_t<bool, hb_vector_t<LayerRecord>> (false, out_layers); |
|
|
|
return hb_pair_t<bool, hb_vector_t<LayerRecord>> (false, out_layers); |
|
|
|
|
|
|
|
|
|
|
|
hb_array_t<const LayerRecord> layers = (this+layersZ).as_array (numLayers).sub_array(old_record->firstLayerIdx, |
|
|
|
auto layers = (this+layersZ).as_array (numLayers).sub_array (old_record->firstLayerIdx, |
|
|
|
old_record->numLayers); |
|
|
|
old_record->numLayers); |
|
|
|
out_layers.resize (layers.length); |
|
|
|
out_layers.resize (layers.length); |
|
|
|
for (unsigned int i = 0; i < layers.length; i++) { |
|
|
|
for (unsigned int i = 0; i < layers.length; i++) { |
|
|
|