9a9e723f02
Introduce a Skottie JSON extension for controlling vertical text alignment ("sk_vj"), with a single public value for now: 1 (centered). Refactor SkottieShaper to handle vertical adjustments based on a VAlign enum: kTop - the topmost line is ascent-aligned with the box top (AE text-box behavior) kTopBaseline - the topmost line is baseline-aligned with the top box (AE text-point behavior) kCenter - the text center is aligned with the box center ("sk_vj": 1, Skottie extension) Also externalize the vertical adjustment as a text blob offset (instead of baking into blob glyph offsets). Change-Id: I29a414d4c6ccfafc534ca7b61f48ef96d8cff86e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205590 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
629 lines
11 KiB
JSON
629 lines
11 KiB
JSON
{
|
|
"assets": [],
|
|
"ddd": 0,
|
|
"fonts": {
|
|
"list": [
|
|
{
|
|
"ascent": 75,
|
|
"fClass": "",
|
|
"fFamily": "Roboto",
|
|
"fName": "Roboto-Medium",
|
|
"fPath": "https://fonts.googleapis.com/css?family=Roboto",
|
|
"fStyle": "Medium",
|
|
"fWeight": "",
|
|
"origin": 3
|
|
}
|
|
]
|
|
},
|
|
"fr": 60,
|
|
"h": 500,
|
|
"ip": 0,
|
|
"layers": [
|
|
{
|
|
"ao": 0,
|
|
"bm": 0,
|
|
"ddd": 0,
|
|
"ind": 1,
|
|
"ip": 0,
|
|
"ks": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 1,
|
|
"k": [
|
|
0,
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 11,
|
|
"k": 100
|
|
},
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
335.5,
|
|
36.5,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 10,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 6,
|
|
"k": [
|
|
110.095,
|
|
100,
|
|
100
|
|
]
|
|
}
|
|
},
|
|
"nm": "Left-aligned 123 abcde fghi",
|
|
"op": 300,
|
|
"sr": 1,
|
|
"st": 0,
|
|
"t": {
|
|
"a": [],
|
|
"d": {
|
|
"k": [
|
|
{
|
|
"s": {
|
|
"f": "Roboto-Medium",
|
|
"fc": [
|
|
0.973,
|
|
0,
|
|
0
|
|
],
|
|
"j": 1,
|
|
"sk_vj": 1,
|
|
"lh": 45.6000061035156,
|
|
"ls": 0,
|
|
"ps": [
|
|
-281.343902587891,
|
|
-20.5
|
|
],
|
|
"s": 38,
|
|
"sz": [
|
|
181.052062988281,
|
|
137
|
|
],
|
|
"t": "Left-aligned 123 abcde fghi",
|
|
"tr": -100
|
|
},
|
|
"t": 0
|
|
}
|
|
]
|
|
},
|
|
"m": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"g": 1
|
|
},
|
|
"p": {}
|
|
},
|
|
"ty": 5
|
|
},
|
|
{
|
|
"ao": 0,
|
|
"bm": 0,
|
|
"ddd": 0,
|
|
"ind": 2,
|
|
"ip": 0,
|
|
"ks": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 1,
|
|
"k": [
|
|
0,
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 11,
|
|
"k": 100
|
|
},
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
161.5,
|
|
84.5,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 10,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 6,
|
|
"k": [
|
|
47.482,
|
|
343.902,
|
|
100
|
|
]
|
|
}
|
|
},
|
|
"nm": "Shape Layer 2",
|
|
"op": 300,
|
|
"shapes": [
|
|
{
|
|
"d": 1,
|
|
"hd": false,
|
|
"mn": "ADBE Vector Shape - Rect",
|
|
"nm": "Rectangle Path 1",
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 3,
|
|
"k": [
|
|
-71,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 4,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
420,
|
|
41
|
|
]
|
|
},
|
|
"ty": "rc"
|
|
},
|
|
{
|
|
"bm": 0,
|
|
"c": {
|
|
"a": 0,
|
|
"ix": 4,
|
|
"k": [
|
|
0.21953125298,
|
|
0.21953125298,
|
|
0.21953125298,
|
|
1
|
|
]
|
|
},
|
|
"hd": false,
|
|
"mn": "ADBE Vector Graphic - Fill",
|
|
"nm": "Fill 1",
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 5,
|
|
"k": 100
|
|
},
|
|
"r": 1,
|
|
"ty": "fl"
|
|
}
|
|
],
|
|
"sr": 1,
|
|
"st": 0,
|
|
"ty": 4
|
|
},
|
|
{
|
|
"ao": 0,
|
|
"bm": 0,
|
|
"ddd": 0,
|
|
"ind": 3,
|
|
"ip": 0,
|
|
"ks": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 1,
|
|
"k": [
|
|
0,
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 11,
|
|
"k": 100
|
|
},
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
457.5,
|
|
203.5,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 10,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 6,
|
|
"k": [
|
|
110.095,
|
|
100,
|
|
100
|
|
]
|
|
}
|
|
},
|
|
"nm": "Center-aligned 123 abcde fghi",
|
|
"op": 300,
|
|
"sr": 1,
|
|
"st": 0,
|
|
"t": {
|
|
"a": [],
|
|
"d": {
|
|
"k": [
|
|
{
|
|
"s": {
|
|
"f": "Roboto-Medium",
|
|
"fc": [
|
|
0.973,
|
|
0,
|
|
0
|
|
],
|
|
"j": 2,
|
|
"sk_vj": 1,
|
|
"lh": 45.6000061035156,
|
|
"ls": 0,
|
|
"ps": [
|
|
-281.343902587891,
|
|
-20.5
|
|
],
|
|
"s": 38,
|
|
"sz": [
|
|
181.052062988281,
|
|
137
|
|
],
|
|
"t": "Center-aligned 123 abcde fghi",
|
|
"tr": -100
|
|
},
|
|
"t": 0
|
|
}
|
|
]
|
|
},
|
|
"m": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"g": 1
|
|
},
|
|
"p": {}
|
|
},
|
|
"ty": 5
|
|
},
|
|
{
|
|
"ao": 0,
|
|
"bm": 0,
|
|
"ddd": 0,
|
|
"ind": 4,
|
|
"ip": 0,
|
|
"ks": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 1,
|
|
"k": [
|
|
0,
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 11,
|
|
"k": 100
|
|
},
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
283.5,
|
|
251.5,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 10,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 6,
|
|
"k": [
|
|
47.482,
|
|
343.902,
|
|
100
|
|
]
|
|
}
|
|
},
|
|
"nm": "Shape Layer 3",
|
|
"op": 300,
|
|
"shapes": [
|
|
{
|
|
"d": 1,
|
|
"hd": false,
|
|
"mn": "ADBE Vector Shape - Rect",
|
|
"nm": "Rectangle Path 1",
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 3,
|
|
"k": [
|
|
-71,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 4,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
420,
|
|
41
|
|
]
|
|
},
|
|
"ty": "rc"
|
|
},
|
|
{
|
|
"bm": 0,
|
|
"c": {
|
|
"a": 0,
|
|
"ix": 4,
|
|
"k": [
|
|
0.21953125298,
|
|
0.21953125298,
|
|
0.21953125298,
|
|
1
|
|
]
|
|
},
|
|
"hd": false,
|
|
"mn": "ADBE Vector Graphic - Fill",
|
|
"nm": "Fill 1",
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 5,
|
|
"k": 100
|
|
},
|
|
"r": 1,
|
|
"ty": "fl"
|
|
}
|
|
],
|
|
"sr": 1,
|
|
"st": 0,
|
|
"ty": 4
|
|
},
|
|
{
|
|
"ao": 0,
|
|
"bm": 0,
|
|
"ddd": 0,
|
|
"ind": 5,
|
|
"ip": 0,
|
|
"ks": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 1,
|
|
"k": [
|
|
0,
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 11,
|
|
"k": 100
|
|
},
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
580.5,
|
|
369.5,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 10,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 6,
|
|
"k": [
|
|
110.095,
|
|
100,
|
|
100
|
|
]
|
|
}
|
|
},
|
|
"nm": "Right-aligned 123 abcde fghi",
|
|
"op": 300,
|
|
"sr": 1,
|
|
"st": 0,
|
|
"t": {
|
|
"a": [],
|
|
"d": {
|
|
"k": [
|
|
{
|
|
"s": {
|
|
"f": "Roboto-Medium",
|
|
"fc": [
|
|
0.973,
|
|
0,
|
|
0
|
|
],
|
|
"j": 0,
|
|
"sk_vj": 1,
|
|
"lh": 45.6000061035156,
|
|
"ls": 0,
|
|
"ps": [
|
|
-281.343902587891,
|
|
-20.5
|
|
],
|
|
"s": 38,
|
|
"sz": [
|
|
181.052062988281,
|
|
137
|
|
],
|
|
"t": "Right-aligned 123 abcde fghi",
|
|
"tr": -100
|
|
},
|
|
"t": 0
|
|
}
|
|
]
|
|
},
|
|
"m": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"g": 1
|
|
},
|
|
"p": {}
|
|
},
|
|
"ty": 5
|
|
},
|
|
{
|
|
"ao": 0,
|
|
"bm": 0,
|
|
"ddd": 0,
|
|
"ind": 6,
|
|
"ip": 0,
|
|
"ks": {
|
|
"a": {
|
|
"a": 0,
|
|
"ix": 1,
|
|
"k": [
|
|
0,
|
|
0,
|
|
0
|
|
]
|
|
},
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 11,
|
|
"k": 100
|
|
},
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
406.5,
|
|
417.5,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 10,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 6,
|
|
"k": [
|
|
47.482,
|
|
343.902,
|
|
100
|
|
]
|
|
}
|
|
},
|
|
"nm": "Shape Layer 4",
|
|
"op": 300,
|
|
"shapes": [
|
|
{
|
|
"d": 1,
|
|
"hd": false,
|
|
"mn": "ADBE Vector Shape - Rect",
|
|
"nm": "Rectangle Path 1",
|
|
"p": {
|
|
"a": 0,
|
|
"ix": 3,
|
|
"k": [
|
|
-71,
|
|
0
|
|
]
|
|
},
|
|
"r": {
|
|
"a": 0,
|
|
"ix": 4,
|
|
"k": 0
|
|
},
|
|
"s": {
|
|
"a": 0,
|
|
"ix": 2,
|
|
"k": [
|
|
420,
|
|
41
|
|
]
|
|
},
|
|
"ty": "rc"
|
|
},
|
|
{
|
|
"bm": 0,
|
|
"c": {
|
|
"a": 0,
|
|
"ix": 4,
|
|
"k": [
|
|
0.21953125298,
|
|
0.21953125298,
|
|
0.21953125298,
|
|
1
|
|
]
|
|
},
|
|
"hd": false,
|
|
"mn": "ADBE Vector Graphic - Fill",
|
|
"nm": "Fill 1",
|
|
"o": {
|
|
"a": 0,
|
|
"ix": 5,
|
|
"k": 100
|
|
},
|
|
"r": 1,
|
|
"ty": "fl"
|
|
}
|
|
],
|
|
"sr": 1,
|
|
"st": 0,
|
|
"ty": 4
|
|
}
|
|
],
|
|
"markers": [],
|
|
"nm": "Comp 1",
|
|
"op": 300,
|
|
"v": "5.5.0",
|
|
"w": 500
|
|
}
|