27 {
28
29
30
31
32
33
34
35
38 if (!jch || !jdata) {
39 return false;
40 }
41
42 const auto* ch_ptr = jch->
begin();
43 const auto ch_len = jch->
size();
45 return false;
46 }
47
50 if (!SkTFitsIn<SkGlyphID>(uni)) {
51
52
53 return false;
54 }
55 const auto glyph_id = SkTo<SkGlyphID>(uni);
56
57
58 static constexpr float kPtScale = 0.01f;
59 const auto advance =
ParseDefault(jchar[
"w"], 0.0f) * kPtScale;
60
61
63 if (auto comp_node = ParseGlyphComp(abuilder, *jdata, &glyph_size)) {
64
65
66
67
68
69
72
73
74
75 fGlyphComps.
set(glyph_id, std::move(comp_node));
76
77 return true;
78 }
79
80
82 if (!ParseGlyphPath(abuilder, *jdata, &
path)) {
83 return false;
84 }
85
87
89
90 return true;
91}
void setGlyph(SkGlyphID, float advance, const SkPath &)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
const char * begin() const
SK_SPI SkUnichar NextUTF8(const char **ptr, const char *end)
SK_SPI int CountUTF8(const char *utf8, size_t byteLength)
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
T ParseDefault(const skjson::Value &v, const T &defaultValue)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)