Added a test
diff --git a/snapshot-tests/src/main/assets/Tests/TextWithPsCenter.json b/snapshot-tests/src/main/assets/Tests/TextWithPsCenter.json new file mode 100644 index 0000000..284d5ba --- /dev/null +++ b/snapshot-tests/src/main/assets/Tests/TextWithPsCenter.json
@@ -0,0 +1,2039 @@ +{ + "v": "5.9.2", + "fr": 24, + "ip": 0, + "op": 41, + "w": 1080, + "h": 1080, + "nm": "CenterAlignedNoScale", + "ddd": 0, + "assets": [], + "fonts": { + "list": [ + { + "fName": "MaisonNeue-Book", + "fFamily": "Maison Neue", + "fStyle": "Book", + "ascent": 72.9995727539062 + } + ] + }, + "layers": [ + { + "ddd": 0, + "ind": 1, + "ty": 5, + "nm": "CENTER ALIGNED", + "sr": 1, + "ks": { + "o": { + "a": 0, + "k": 100, + "ix": 11 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "p": { + "a": 0, + "k": [ + 540, + 540, + 0 + ], + "ix": 2, + "l": 2 + }, + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1, + "l": 2 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6, + "l": 2 + } + }, + "ao": 0, + "t": { + "d": { + "k": [ + { + "s": { + "sz": [ + 1080, + 100 + ], + "ps": [ + -540, + 0 + ], + "s": 118, + "f": "MaisonNeue-Book", + "t": "CENTER ALIGNED", + "ca": 0, + "j": 2, + "tr": 100, + "lh": 27.5, + "ls": 0, + "fc": [ + 0.379, + 0.379, + 0.379 + ] + }, + "t": 0 + } + ] + }, + "p": {}, + "m": { + "g": 1, + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + } + }, + "a": [] + }, + "ip": 0, + "op": 180, + "st": 0, + "bm": 0 + }, + { + "ddd": 0, + "ind": 2, + "ty": 4, + "nm": "BackgroundLayer", + "sr": 1, + "ks": { + "o": { + "a": 0, + "k": 100, + "ix": 11 + }, + "r": { + "a": 0, + "k": 0, + "ix": 10 + }, + "p": { + "a": 0, + "k": [ + 892.749, + 380.408, + 0 + ], + "ix": 2, + "l": 2 + }, + "a": { + "a": 0, + "k": [ + 0, + 0, + 0 + ], + "ix": 1, + "l": 2 + }, + "s": { + "a": 0, + "k": [ + 100, + 100, + 100 + ], + "ix": 6, + "l": 2 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ty": "rc", + "d": 1, + "s": { + "a": 0, + "k": [ + 1920, + 1920 + ], + "ix": 2 + }, + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 3 + }, + "r": { + "a": 0, + "k": 0, + "ix": 4 + }, + "nm": "Rectangle Path 1", + "mn": "ADBE Vector Shape - Rect", + "hd": false + }, + { + "ty": "fl", + "c": { + "a": 0, + "k": [ + 0.996078431373, + 0.83137254902, + 0.749019607843, + 1 + ], + "ix": 4 + }, + "o": { + "a": 0, + "k": 100, + "ix": 5 + }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 2 + }, + "a": { + "a": 0, + "k": [ + 0, + 0 + ], + "ix": 1 + }, + "s": { + "a": 0, + "k": [ + 100, + 100 + ], + "ix": 3 + }, + "r": { + "a": 0, + "k": 0, + "ix": 6 + }, + "o": { + "a": 0, + "k": 100, + "ix": 7 + }, + "sk": { + "a": 0, + "k": 0, + "ix": 4 + }, + "sa": { + "a": 0, + "k": 0, + "ix": 5 + }, + "nm": "Transform" + } + ], + "nm": "Rectangle 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 180, + "st": 0, + "bm": 0 + } + ], + "markers": [], + "chars": [ + { + "ch": "C", + "size": 118, + "style": "Book", + "w": 64.5, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + -18.027, + 0 + ], + [ + -1.309, + 16.415 + ], + [ + 0, + 0 + ], + [ + 10.876, + 0 + ], + [ + 0, + 18.027 + ], + [ + -13.193, + 0 + ], + [ + -2.014, + -11.783 + ], + [ + 0, + 0 + ], + [ + 14.502, + 0 + ], + [ + 0, + -22.055 + ] + ], + "o": [ + [ + 15.61, + 0 + ], + [ + 0, + 0 + ], + [ + -1.309, + 12.891 + ], + [ + -13.293, + 0 + ], + [ + 0, + -17.825 + ], + [ + 10.272, + 0 + ], + [ + 0, + 0 + ], + [ + -2.014, + -15.005 + ], + [ + -17.825, + 0 + ], + [ + 0, + 22.357 + ] + ], + "v": [ + [ + 34.241, + 1.511 + ], + [ + 61.432, + -24.976 + ], + [ + 52.872, + -26.083 + ], + [ + 34.241, + -6.345 + ], + [ + 12.891, + -35.248 + ], + [ + 34.241, + -64.151 + ], + [ + 52.972, + -46.024 + ], + [ + 61.23, + -47.433 + ], + [ + 34.241, + -72.006 + ], + [ + 4.532, + -35.248 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "C", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "C", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "E", + "size": 118, + "style": "Book", + "w": 56.1, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 8.661, + 0 + ], + [ + 50.958, + 0 + ], + [ + 50.958, + -7.855 + ], + [ + 16.919, + -7.855 + ], + [ + 16.919, + -32.629 + ], + [ + 48.138, + -32.629 + ], + [ + 48.138, + -40.082 + ], + [ + 16.919, + -40.082 + ], + [ + 16.919, + -62.64 + ], + [ + 50.958, + -62.64 + ], + [ + 50.958, + -70.496 + ], + [ + 8.661, + -70.496 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "E", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "E", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "N", + "size": 118, + "style": "Book", + "w": 67.2, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 8.661, + 0 + ], + [ + 16.919, + 0 + ], + [ + 16.919, + -57.504 + ], + [ + 17.12, + -57.504 + ], + [ + 49.146, + 0 + ], + [ + 59.015, + 0 + ], + [ + 59.015, + -70.496 + ], + [ + 50.656, + -70.496 + ], + [ + 50.656, + -12.991 + ], + [ + 50.455, + -12.991 + ], + [ + 18.43, + -70.496 + ], + [ + 8.661, + -70.496 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "N", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "N", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "T", + "size": 118, + "style": "Book", + "w": 58.9, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 25.479, + 0 + ], + [ + 33.838, + 0 + ], + [ + 33.838, + -62.64 + ], + [ + 55.792, + -62.64 + ], + [ + 55.792, + -70.496 + ], + [ + 3.525, + -70.496 + ], + [ + 3.525, + -62.64 + ], + [ + 25.479, + -62.64 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "T", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "T", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "R", + "size": 118, + "style": "Book", + "w": 60.9, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 11.179 + ], + [ + 14.703, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 11.078, + -1.813 + ], + [ + 0, + -12.991 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 40.182, + -29.205 + ], + [ + 57.806, + -49.649 + ], + [ + 34.341, + -70.496 + ], + [ + 8.661, + -70.496 + ], + [ + 8.661, + 0 + ], + [ + 16.919, + 0 + ], + [ + 16.919, + -28.601 + ], + [ + 31.018, + -28.601 + ], + [ + 45.923, + 0 + ], + [ + 55.692, + 0 + ], + [ + 40.182, + -29.004 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "R", + "mn": "ADBE Vector Shape - Group", + "hd": false + }, + { + "ind": 1, + "ty": "sh", + "ix": 2, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + -8.56 + ], + [ + 10.373, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 10.474, + 0 + ], + [ + 0, + 8.661 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 16.919, + -36.456 + ], + [ + 16.919, + -62.64 + ], + [ + 33.636, + -62.64 + ], + [ + 49.448, + -49.649 + ], + [ + 33.636, + -36.456 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "R", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "R", + "np": 5, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": " ", + "size": 118, + "style": "Book", + "w": 27, + "data": {}, + "fFamily": "Maison Neue" + }, + { + "ch": "A", + "size": 118, + "style": "Book", + "w": 61.3, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 50.656, + 0 + ], + [ + 59.216, + 0 + ], + [ + 33.939, + -70.496 + ], + [ + 25.882, + -70.496 + ], + [ + 0.504, + 0 + ], + [ + 9.064, + 0 + ], + [ + 13.998, + -14.2 + ], + [ + 45.721, + -14.2 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "A", + "mn": "ADBE Vector Shape - Group", + "hd": false + }, + { + "ind": 1, + "ty": "sh", + "ix": 2, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 16.617, + -21.451 + ], + [ + 29.81, + -59.116 + ], + [ + 30.011, + -59.116 + ], + [ + 43.204, + -21.451 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "A", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "A", + "np": 5, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "L", + "size": 118, + "style": "Book", + "w": 51.9, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 8.661, + 0 + ], + [ + 48.743, + 0 + ], + [ + 48.743, + -7.855 + ], + [ + 16.919, + -7.855 + ], + [ + 16.919, + -70.496 + ], + [ + 8.661, + -70.496 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "L", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "L", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "I", + "size": 118, + "style": "Book", + "w": 25.4, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 8.661, + 0 + ], + [ + 16.919, + 0 + ], + [ + 16.919, + -70.496 + ], + [ + 8.661, + -70.496 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "I", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "I", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "G", + "size": 118, + "style": "Book", + "w": 65.3, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + -18.027, + 0 + ], + [ + 0, + 17.825 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 12.085, + 0 + ], + [ + 0, + 17.825 + ], + [ + -13.193, + 0 + ], + [ + -2.014, + -11.078 + ], + [ + 0, + 0 + ], + [ + 14.099, + 0 + ], + [ + 0, + -22.357 + ] + ], + "o": [ + [ + 16.516, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0.302, + 12.79 + ], + [ + -13.193, + 0 + ], + [ + 0, + -17.825 + ], + [ + 9.97, + 0 + ], + [ + 0, + 0 + ], + [ + -2.115, + -14.099 + ], + [ + -18.027, + 0 + ], + [ + 0, + 22.357 + ] + ], + "v": [ + [ + 34.241, + 1.511 + ], + [ + 61.23, + -27.695 + ], + [ + 61.23, + -34.845 + ], + [ + 35.147, + -34.845 + ], + [ + 35.147, + -26.99 + ], + [ + 53.073, + -26.99 + ], + [ + 34.241, + -6.345 + ], + [ + 12.891, + -35.248 + ], + [ + 34.241, + -64.151 + ], + [ + 52.771, + -47.232 + ], + [ + 61.029, + -48.743 + ], + [ + 34.241, + -72.006 + ], + [ + 4.532, + -35.248 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "G", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "G", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + }, + { + "ch": "D", + "size": 118, + "style": "Book", + "w": 65.1, + "data": { + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 24.875 + ], + [ + 17.825, + 0 + ], + [ + 0, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 18.43, + 0 + ], + [ + 0, + -22.256 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 8.661, + 0 + ], + [ + 30.011, + 0 + ], + [ + 61.029, + -35.349 + ], + [ + 30.615, + -70.496 + ], + [ + 8.661, + -70.496 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "D", + "mn": "ADBE Vector Shape - Group", + "hd": false + }, + { + "ind": 1, + "ty": "sh", + "ix": 2, + "ks": { + "a": 0, + "k": { + "i": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 0, + -18.027 + ], + [ + 14.301, + 0 + ] + ], + "o": [ + [ + 0, + 0 + ], + [ + 0, + 0 + ], + [ + 13.696, + 0 + ], + [ + 0, + 19.94 + ], + [ + 0, + 0 + ] + ], + "v": [ + [ + 16.919, + -7.855 + ], + [ + 16.919, + -62.64 + ], + [ + 30.112, + -62.64 + ], + [ + 52.67, + -35.349 + ], + [ + 29.507, + -7.855 + ] + ], + "c": true + }, + "ix": 2 + }, + "nm": "D", + "mn": "ADBE Vector Shape - Group", + "hd": false + } + ], + "nm": "D", + "np": 5, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ] + }, + "fFamily": "Maison Neue" + } + ] +} \ No newline at end of file
diff --git a/snapshot-tests/src/main/assets/Tests/TextWithPs.json b/snapshot-tests/src/main/assets/Tests/TextWithPsLeft.json similarity index 100% rename from snapshot-tests/src/main/assets/Tests/TextWithPs.json rename to snapshot-tests/src/main/assets/Tests/TextWithPsLeft.json