// Copyright (c) 2010-2017 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.
// Validates all charstrings in |char_strings_index|. Charstring is a small // language for font hinting defined in Adobe Technical Note #5177. // http://www.adobe.com/devnet/font/pdfs/5177.Type2.pdf // // The validation will fail if one of the following conditions is met: // 1. The code uses more than the max argument stack size (48 for CFF1; 513 for CFF2) // 2. The code uses deeply nested subroutine calls (more than 10 levels.) // 3. The code passes invalid number of operands to an operator. // 4. The code calls an undefined global or local subroutine. // 5. The code uses one of the following operators that are unlikely used in // an ordinary fonts, and could be dangerous: random, put, get, index, roll. // // Arguments: // cff: parent OpenTypeCFF reference // global_subrs_index: Global subroutines which could be called by a charstring // in |char_strings_index|. // cff_table: A buffer which contains actual byte code of charstring, global // subroutines and local subroutines. bool ValidateCFFCharStrings(
OpenTypeCFF& cff, const CFFIndex &global_subrs_index,
Buffer *cff_table);
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.