31 size_t size = wb.bytesWritten();
33 wb.writeToMemory(storage.
get());
75 const float sizes[] = {0, 0.001f, 1, 10, 10.001f, 100000.01f};
76 const float scales[] = {-5, 0, 1, 5};
77 const float skews[] = {-5, 0, 5};
84 const unsigned int flags[] = {
93 for (
float size : sizes) {
95 for (
float scale : scales) {
97 for (
float skew : skews) {
99 for (
auto edge : edges) {
100 font.setEdging(edge);
101 for (
auto hint : hints) {
102 font.setHinting(hint);
106 font.setTypeface(typeface);
DEF_TEST(Font_flatten, reporter)
static SkFont serialize_deserialize(const SkFont &font, skiatest::Reporter *reporter)
static void apply_flags(SkFont *font, unsigned flags)
@ kNone
glyph outlines unchanged
@ kFull
modifies glyph outlines for maximum constrast
static constexpr bool SkToBool(const T &x)
#define REPORTER_ASSERT(r, cond,...)
void setTypefaceRecorder(sk_sp< SkRefCntSet >)
static void Flatten(const SkFont &, SkWriteBuffer &buffer)
static bool Unflatten(SkFont *, SkReadBuffer &buffer)
@ kAlias
no transparent pixels on glyph edges
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
void setTypefaceArray(sk_sp< SkTypeface > array[], int count)
void copyToArray(T *array) const
FlutterSemanticsFlag flag
FlutterSemanticsFlag flags
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
font
Font Metadata and Metrics.