37#define kFontTableTag_head SkSetFourByteTag('h', 'e', 'a', 'd')
38#define kFontTableTag_hhea SkSetFourByteTag('h', 'h', 'e', 'a')
39#define kFontTableTag_maxp SkSetFourByteTag('m', 'a', 'x', 'p')
82 if (tableGlyphs >= 0) {
94 for (
int i = 0;
i < n; ++
i) {
116 SkDebugf(
"Skipping FontHostTest::test_fontstream\n");
121#ifdef DUMP_TTC_TABLES
138 SkDebugf(
"Skipping FontHostTest::test_symbolfont\n");
162 name[0] = (tags[
i] >> 24) & 0xFF;
163 name[1] = (tags[
i] >> 16) & 0xFF;
164 name[2] = (tags[
i] >> 8) & 0xFF;
165 name[3] = (tags[
i] >> 0) & 0xFF;
189 static const char*
const gNames[] = {
191 "Helvetica",
"Arial",
192 "Times",
"Times New Roman",
193 "Courier",
"Courier New",
194 "Terminal",
"MS Sans Serif",
195 "Hiragino Mincho ProN",
"MS PGothic",
215 static const char*
const faces[] = {
217 "Arial",
"Times",
"Times New Roman",
"Helvetica",
"Courier",
218 "Courier New",
"Verdana",
"monospace",
221 static const struct {
237 static const struct {
249 char const *
const txt =
"long.text.with.lots.of.dots.";
250 size_t textLen = strlen(
txt);
260 for (
size_t k = 0; k <
std::size(gScaleRec); ++k) {
261 font.setScaleX(gScaleRec[k].fScaleX);
262 font.setSkewX(gScaleRec[k].fSkewX);
static const struct TagSize gKnownTableSizes[]
static void test_symbolfont(skiatest::Reporter *reporter)
#define kFontTableTag_hhea
DEF_TEST(FontHost, reporter)
static void test_unitsPerEm(skiatest::Reporter *reporter, const sk_sp< SkTypeface > &face)
static void test_countGlyphs(skiatest::Reporter *reporter, const sk_sp< SkTypeface > &face)
#define kFontTableTag_head
#define kFontTableTag_maxp
static void test_tables(skiatest::Reporter *reporter, const sk_sp< SkTypeface > &face)
static void test_advances(skiatest::Reporter *reporter)
static void test_fontstream(skiatest::Reporter *reporter, SkStream *stream, int ttcIndex)
std::unique_ptr< SkStreamAsset > GetResourceAsStream(const char *resource, bool useFileStream)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SkEndian_SwapBE16(n)
@ kNormal
glyph outlines modified to improve constrast
@ kNone
glyph outlines unchanged
@ kSlight
minimal modification to improve constrast
@ kUTF8
uses bytes to represent UTF-8 or ASCII
#define REPORTER_ASSERT(r, cond,...)
const void * data() const
static int GetTableTags(SkStream *, int ttcIndex, SkFontTableTag tags[])
static size_t GetTableSize(SkStream *stream, int ttcIndex, SkFontTableTag tag)
static int CountTTCEntries(SkStream *)
SkGlyphID unicharToGlyph(SkUnichar uni) const
void appendUnichar(SkUnichar uni)
const char * c_str() const
sk_sp< SkData > copyTableData(SkFontTableTag tag) const
SkTypefaceID uniqueID() const
int getUnitsPerEm() const
int getTableTags(SkFontTableTag tags[]) const
size_t getTableSize(SkFontTableTag) const
size_t getTableData(SkFontTableTag tag, size_t offset, size_t length, void *data) const
Optional< SkRect > bounds
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
font
Font Metadata and Metrics.
std::shared_ptr< const fml::Mapping > data
static sk_sp< SkShader > linear(sk_sp< SkShader > shader)