29 bool sysFont,
SkString familyName,
int index)
31 , fIsSysFont(sysFont), fFamilyName(
std::move(familyName)), fIndex(index)
37 *familyName = fFamilyName;
62 :
INHERITED(style, isFixedPitch, sysFont,
std::move(familyName), index)
81 return sk_make_sp<SkTypeface_FreeTypeStream>(
91 return std::make_unique<SkFontData>(std::move(
stream), index, 0,
nullptr, 0,
nullptr, 0);
97 : fFamilyName(
std::move(familyName)) {}
104 return fStyles.
size();
110 *style = fStyles[index]->fontStyle();
119 return fStyles[index];
129 : fDefaultFamily(nullptr)
135 static const char* defaultNames[] = {
136 "Arial",
"Verdana",
"Times New Roman",
"Droid Sans",
"DejaVu Serif",
nullptr
140 if (
nullptr ==
set) {
151 fDefaultFamily =
set;
154 if (
nullptr == fDefaultFamily) {
155 fDefaultFamily = fFamilies[0];
160 return fFamilies.
size();
170 return fFamilies[index];
174 for (
int i = 0;
i < fFamilies.
size(); ++
i) {
191 const char* bcp47[],
int bcp47Count,
198 return this->
makeFromStream(std::make_unique<SkMemoryStream>(std::move(
data)), ttcIndex);
202 int ttcIndex)
const {
bool equals(SkDrawable *a, SkDrawable *b)
sk_sp< T > sk_ref_sp(T *obj)
void setFactoryId(SkTypeface::FactoryId factoryId)
virtual void loadSystemFonts(const SkFontScanner *, Families *) const =0
sk_sp< SkTypeface > onMakeFromStreamIndex(std::unique_ptr< SkStreamAsset >, int ttcIndex) const override
int onCountFamilies() const override
sk_sp< SkFontStyleSet > onCreateStyleSet(int index) const override
SkFontMgr_Custom(const SystemFontLoader &loader)
sk_sp< SkTypeface > onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle &, const char *bcp47[], int bcp47Count, SkUnichar character) const override
sk_sp< SkTypeface > onMatchFamilyStyle(const char familyName[], const SkFontStyle &fontStyle) const override
sk_sp< SkTypeface > onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const override
sk_sp< SkTypeface > onMakeFromData(sk_sp< SkData > data, int ttcIndex) const override
sk_sp< SkTypeface > onMakeFromFile(const char path[], int ttcIndex) const override
sk_sp< SkTypeface > onMakeFromStreamArgs(std::unique_ptr< SkStreamAsset >, const SkFontArguments &) const override
void onGetFamilyName(int index, SkString *familyName) const override
sk_sp< SkFontStyleSet > onMatchFamily(const char familyName[]) const override
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
void getFamilyName(int index, SkString *familyName) const
sk_sp< SkFontStyleSet > matchFamily(const char familyName[]) const
void appendTypeface(sk_sp< SkTypeface > typeface)
void getStyle(int index, SkFontStyle *style, SkString *name) override
SkFontStyleSet_Custom(SkString familyName)
sk_sp< SkTypeface > matchStyle(const SkFontStyle &pattern) override
sk_sp< SkTypeface > createTypeface(int index) override
sk_sp< SkTypeface > matchStyleCSS3(const SkFontStyle &pattern)
virtual sk_sp< SkTypeface > matchStyle(const SkFontStyle &pattern)=0
static std::unique_ptr< SkStreamAsset > MakeFromFile(const char path[])
void set(const SkString &src)
const char * c_str() const
void onGetFamilyName(SkString *familyName) const override
void onGetFontDescriptor(SkFontDescriptor *desc, bool *isLocal) const override
SkTypeface_Custom(const SkFontStyle &style, bool isFixedPitch, bool sysFont, SkString familyName, int index)
sk_sp< SkTypeface > onMakeClone(const SkFontArguments &args) const override
std::unique_ptr< SkStreamAsset > onOpenStream(int *) const override
std::unique_ptr< SkFontData > onMakeFontData() const override
SkTypeface_File(const SkFontStyle &style, bool isFixedPitch, bool sysFont, SkString familyName, const char path[], int index)
sk_sp< SkTypeface > onMakeClone(const SkFontArguments &args) const override
std::unique_ptr< SkStreamAsset > onOpenStream(int *ttcIndex) const override
std::unique_ptr< SkFontData > onMakeFontData() const override
std::unique_ptr< SkFontData > cloneFontData(const SkFontArguments &, SkFontStyle *style) const
static sk_sp< SkTypeface > MakeFromStream(std::unique_ptr< SkStreamAsset >, const SkFontArguments &)
void getFamilyName(SkString *name) const
SkFontStyle fontStyle() const
bool isFixedPitch() const
T & emplace_back(Args &&... args)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
std::shared_ptr< const fml::Mapping > data