[subset] temporarily disable COLRv1 subsetting.

Currently COLRv1 spec is being changed so the subsetting implementation is out of sync. Disable subsetting by failing sanitization for COLRv1 tables and disable all colrv1 tests.
This commit is contained in:
Garret Rieger authored and Behdad Esfahbod committed 2021-07-28 11:36:34 -06:00
1 parent 5dae8297bb
commit acbd8b27dc
4 files changed
+22 -4

No files matched your search

+13 -2
View File
@@ -41,6 +41,10 @@
#define COLRV1_MAX_NESTING_LEVEL 100
#endif
#ifndef COLRV1_DISABLE_SUBSETTING
#define COLRV1_DISABLE_SUBSETTING 1
#endif
namespace OT {
struct COLR;
@@ -597,7 +601,7 @@ template <template<typename> class Var>
struct PaintTranslate
{
HB_INTERNAL void closurev1 (hb_colrv1_closure_context_t* c) const;
bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
@@ -929,7 +933,7 @@ struct COLR
if (!numBaseGlyphs || !numLayers) return;
hb_array_t<const BaseGlyphRecord> baseGlyphs = (this+baseGlyphsZ).as_array (numBaseGlyphs);
hb_array_t<const LayerRecord> all_layers = (this+layersZ).as_array (numLayers);
for (const BaseGlyphRecord record : baseGlyphs)
{
if (!glyphs->has (record.glyphId)) continue;
@@ -970,6 +974,12 @@ struct COLR
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
#if COLRV1_DISABLE_SUBSETTING == 1
return_trace (c->check_struct (this) &&
(this+baseGlyphsZ).sanitize (c, numBaseGlyphs) &&
(this+layersZ).sanitize (c, numLayers) &&
(version == 0));
#else
return_trace (c->check_struct (this) &&
(this+baseGlyphsZ).sanitize (c, numBaseGlyphs) &&
(this+layersZ).sanitize (c, numLayers) &&
@@ -977,6 +987,7 @@ struct COLR
baseGlyphsV1List.sanitize (c, this) &&
layersV1.sanitize (c, this) &&
varStore.sanitize (c, this))));
#endif
}
template<typename BaseIterator, typename LayerIterator,
+1
View File
@@ -39,6 +39,7 @@ EXTRA_DIST += \
expected/colr \
expected/colr_with_components \
expected/colrv1.notoemoji \
expected/colrv1 \
expected/cbdt \
expected/variable \
fonts \
+5 -1
View File
@@ -8,7 +8,6 @@ TESTS = \
tests/cmap14.tests \
tests/colr.tests \
tests/colr_with_components.tests \
tests/colrv1.notoemoji.tests \
tests/full-font.tests \
tests/japanese.tests \
tests/layout.context.tests \
@@ -35,6 +34,11 @@ TESTS = \
tests/variable.tests \
$(NULL)
# TODO: re-enable once colrv1 subsetting is stabilized.
# tests/colrv1.notoemoji.tests
# tests/colrv1.tests
XFAIL_TESTS = \
$(NULL)
+3 -1
View File
@@ -29,7 +29,9 @@ tests = [
'cmap14',
'sbix',
'colr',
'colrv1.notoemoji',
# TODO: re-enable once colrv1 subsetting is stabilized.
# 'colrv1.notoemoji',
# 'colrv1',
'colr_with_components',
'cbdt',
'variable',