#include "include/utils/SkCustomTypeface.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkData.h"
#include "include/core/SkDrawable.h"
#include "include/core/SkFontArguments.h"
#include "include/core/SkFontMetrics.h"
#include "include/core/SkFontParameters.h"
#include "include/core/SkFontStyle.h"
#include "include/core/SkFontTypes.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSerialProcs.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/core/SkTypeface.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkAlign.h"
#include "include/private/base/SkFixed.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTo.h"
#include "src/core/SkAdvancedTypefaceMetrics.h"
#include "src/core/SkFontDescriptor.h"
#include "src/core/SkGlyph.h"
#include "src/core/SkMask.h"
#include "src/core/SkScalerContext.h"
#include "src/core/SkStreamPriv.h"
#include <cstdint>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>
class SkArenaAlloc;
class SkDescriptor;
namespace {
static inline const constexpr bool kSkShowTextBlitCoverage = …;
}
static SkFontMetrics scale_fontmetrics(const SkFontMetrics& src, float sx, float sy) { … }
class SkUserTypeface final : public SkTypeface { … };
SkCustomTypefaceBuilder::SkCustomTypefaceBuilder() { … }
void SkCustomTypefaceBuilder::setMetrics(const SkFontMetrics& fm, float scale) { … }
void SkCustomTypefaceBuilder::setFontStyle(SkFontStyle style) { … }
SkCustomTypefaceBuilder::GlyphRec& SkCustomTypefaceBuilder::ensureStorage(SkGlyphID index) { … }
void SkCustomTypefaceBuilder::setGlyph(SkGlyphID index, float advance, const SkPath& path) { … }
void SkCustomTypefaceBuilder::setGlyph(SkGlyphID index, float advance,
sk_sp<SkDrawable> drawable, const SkRect& bounds) { … }
sk_sp<SkTypeface> SkCustomTypefaceBuilder::detach() { … }
void SkUserTypeface::onFilterRec(SkScalerContextRec* rec) const { … }
void SkUserTypeface::getGlyphToUnicodeMap(SkUnichar* glyphToUnicode) const { … }
std::unique_ptr<SkAdvancedTypefaceMetrics> SkUserTypeface::onGetAdvancedMetrics() const { … }
void SkUserTypeface::onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const { … }
void SkUserTypeface::onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const { … }
void SkUserTypeface::onGetFamilyName(SkString* familyName) const { … }
bool SkUserTypeface::onGetPostScriptName(SkString*) const { … }
SkTypeface::LocalizedStrings* SkUserTypeface::onCreateFamilyNameIterator() const { … }
class SkUserScalerContext : public SkScalerContext { … };
std::unique_ptr<SkScalerContext> SkUserTypeface::onCreateScalerContext(
const SkScalerContextEffects& effects, const SkDescriptor* desc) const
{ … }
static constexpr int kMaxGlyphCount = …;
static constexpr size_t kHeaderSize = …;
static const char gHeaderString[] = …;
static_assert …;
enum GlyphType : uint32_t { … };
std::unique_ptr<SkStreamAsset> SkUserTypeface::onOpenStream(int* ttcIndex) const { … }
class AutoRestorePosition { … };
sk_sp<SkTypeface> SkCustomTypefaceBuilder::Deserialize(SkStream* stream) { … }
sk_sp<SkTypeface> SkCustomTypefaceBuilder::MakeFromStream(std::unique_ptr<SkStreamAsset> stream,
const SkFontArguments&) { … }