/** An implementation of LocalizedStrings which obtains it's data from a 'name' table. */ class LocalizedStrings_NameTable : public SkTypeface::LocalizedStrings {
public: /** Takes ownership of the nameTableData and will free it with SK_DELETE. */
LocalizedStrings_NameTable(std::unique_ptr<uint8_t[]> nameTableData, size_t size,
SK_OT_USHORT types[], int typesCount)
: fTypes(types), fTypesCount(typesCount), fTypesIndex(0)
, fNameTableData(std::move(nameTableData))
, fFamilyNameIter(fNameTableData.get(), size, fTypes[fTypesIndex])
{ }
/** Creates an iterator over all data in the 'name' table of a typeface. *Ifnovalid'name'tablecanbefound,returnsnullptr.
*/ static sk_sp<LocalizedStrings_NameTable> Make( const SkTypeface& typeface,
SK_OT_USHORT types[], int typesCount);
/** Creates an iterator over all the family names in the 'name' table of a typeface. *Ifnovalid'name'tablecanbefound,returnsnullptr.
*/ static sk_sp<LocalizedStrings_NameTable> MakeForFamilyNames(const SkTypeface& typeface);
SK_OT_USHORT* fTypes; int fTypesCount; int fTypesIndex;
std::unique_ptr<uint8_t[]> fNameTableData;
SkOTTableName::Iterator fFamilyNameIter;
};
/** An implementation of LocalizedStrings which has one name. */ class LocalizedStrings_SingleName : public SkTypeface::LocalizedStrings {
public:
LocalizedStrings_SingleName(SkString name, SkString language)
: fName(std::move(name)), fLanguage(std::move(language)), fHasNext(true) {}
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.