// Copyright (c) 2018 The OTS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
// check axisCount == fvar->axisCount
OpenTypeFVAR* fvar = static_cast<OpenTypeFVAR*>(
GetFont()->GetTypedTable(OTS_TAG_FVAR)); if (!fvar) { return DropVariations("Required fvar table is missing");
} if (axisCount != fvar->AxisCount()) { return DropVariations("Axis count mismatch");
}
// check glyphCount == maxp->num_glyphs
OpenTypeMAXP* maxp = static_cast<OpenTypeMAXP*>(
GetFont()->GetTypedTable(OTS_TAG_MAXP)); if (!maxp) { return DropVariations("Required maxp table is missing");
} if (glyphCount != maxp->num_glyphs) { return DropVariations("Glyph count mismatch");
}
if (sharedTupleCount > 0) { if (sharedTuplesOffset < table.offset() || sharedTuplesOffset > length) { return DropVariations("Invalid sharedTuplesOffset");
} if (!ParseSharedTuples(GetFont(),
data + sharedTuplesOffset, length - sharedTuplesOffset,
sharedTupleCount, axisCount)) { return DropVariations("Failed to parse shared tuples");
}
}
if (glyphVariationDataArrayOffset) { if (glyphVariationDataArrayOffset > length) { return DropVariations("Invalid glyphVariationDataArrayOffset");
} if (!ParseGlyphVariationDataArray(GetFont(),
data + table.offset(), length - table.offset(),
flags, glyphCount, axisCount, sharedTupleCount,
data + glyphVariationDataArrayOffset,
length - glyphVariationDataArrayOffset)) { return DropVariations("Failed to read glyph variation data array");
}
}
this->m_data = data;
this->m_length = length;
returntrue;
}
#ifdef OTS_SYNTHESIZE_MISSING_GVAR bool OpenTypeGVAR::InitEmpty() { // Generate an empty but well-formed 'gvar' table for the font. const ots::Font* font = GetFont();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.