/* * Copyright 2018 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/ #ifndef SkClusterator_DEFINED #define SkClusterator_DEFINED
#include <cstdint>
namespace sktext { class GlyphRun;
}
/** Given the m-to-n glyph-to-character mapping data (as returned by
harfbuzz), iterate over the clusters. */ class SkClusterator { public:
SkClusterator(const sktext::GlyphRun& run);
uint32_t glyphCount() const { return fGlyphCount; } bool reversedChars() const { return fReversedChars; } struct Cluster { constchar* fUtf8Text;
uint32_t fTextByteLength;
uint32_t fGlyphIndex;
uint32_t fGlyphCount; explicitoperatorbool() const { return fGlyphCount != 0; } booloperator==(const SkClusterator::Cluster& o) { return fUtf8Text == o.fUtf8Text
&& fTextByteLength == o.fTextByteLength
&& fGlyphIndex == o.fGlyphIndex
&& fGlyphCount == o.fGlyphCount;
}
};
Cluster next();
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.