Skip to content
Snippets Groups Projects
Commit 4f936f7a authored by StarArawn's avatar StarArawn
Browse files

Fixed issues with fonts and text rendering.

parent 09b8a057
No related branches found
No related tags found
No related merge requests found
{
"atlas": {
"type": "msdf",
"distanceRange": 2,
"size": 32.5,
"width": 280,
"height": 280,
"yOrigin": "bottom"
},
"metrics": {
"emSize": 1,
"lineHeight": 1.4609375,
"ascender": 1.23046875,
"descender": -0.23046875,
"underlineY": 0.07470703125,
"underlineThickness": 0.0498046875
},
"glyphs": [
{
"unicode": 32,
"advance": 0.3076171875
},
{
"unicode": 33,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.030863131009615387,
"right": 0.33842397836538463,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 175.5,
"bottom": 80.5,
"right": 187.5,
"top": 107.5
}
},
{
"unicode": 34,
"advance": 0.46142578125,
"planeBounds": {
"left": -0.038630558894230768,
"bottom": 0.50727914663461537,
"right": 0.42290790264423078,
"top": 0.87650991586538463
},
"atlasBounds": {
"left": 182.5,
"bottom": 36.5,
"right": 197.5,
"top": 48.5
}
},
{
"unicode": 35,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.038668118990384616,
"right": 0.64607872596153848,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 252.5,
"bottom": 168.5,
"right": 274.5,
"top": 193.5
}
},
{
"unicode": 36,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 188.5,
"bottom": 80.5,
"right": 210.5,
"top": 107.5
}
},
{
"unicode": 37,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 161.5,
"bottom": 0.5,
"right": 183.5,
"top": 22.5
}
},
{
"unicode": 38,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 211.5,
"bottom": 80.5,
"right": 233.5,
"top": 107.5
}
},
{
"unicode": 39,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": 0.42279522235576922,
"right": 0.26908052884615385,
"top": 0.88433368389423084
},
"atlasBounds": {
"left": 144.5,
"bottom": 33.5,
"right": 154.5,
"top": 48.5
}
},
{
"unicode": 40,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.11534705528846154,
"right": 0.33842397836538463,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 187.5,
"bottom": 120.5,
"right": 199.5,
"top": 150.5
}
},
{
"unicode": 41,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.11534705528846154,
"right": 0.33842397836538463,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 200.5,
"bottom": 120.5,
"right": 212.5,
"top": 150.5
}
},
{
"unicode": 42,
"advance": 0.46142578125,
"planeBounds": {
"left": -0.038630558894230768,
"bottom": 0.19206355168269232,
"right": 0.42290790264423078,
"top": 0.80744816706730771
},
"atlasBounds": {
"left": 253.5,
"bottom": 2.5,
"right": 268.5,
"top": 22.5
}
},
{
"unicode": 43,
"advance": 0.5380859375,
"planeBounds": {
"left": -0.030825570913461539,
"bottom": 0.045834585336538461,
"right": 0.49225135216346161,
"top": 0.56891150841346161
},
"atlasBounds": {
"left": 249.5,
"bottom": 239.5,
"right": 266.5,
"top": 256.5
}
},
{
"unicode": 44,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": -0.26909930889423078,
"right": 0.26908052884615385,
"top": 0.19243915264423078
},
"atlasBounds": {
"left": 155.5,
"bottom": 33.5,
"right": 165.5,
"top": 48.5
}
},
{
"unicode": 45,
"advance": 0.5380859375,
"planeBounds": {
"left": -0.030825570913461539,
"bottom": 0.1996807391826923,
"right": 0.49225135216346161,
"top": 0.4150653545673077
},
"atlasBounds": {
"left": 254.5,
"bottom": 195.5,
"right": 271.5,
"top": 202.5
}
},
{
"unicode": 46,
"advance": 0.23046875,
"planeBounds": {
"left": -0.030788010817307691,
"bottom": -0.030788010817307691,
"right": 0.1845966045673077,
"top": 0.1845966045673077
},
"atlasBounds": {
"left": 187.5,
"bottom": 112.5,
"right": 194.5,
"top": 119.5
}
},
{
"unicode": 47,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 77.5,
"bottom": 49.5,
"right": 99.5,
"top": 76.5
}
},
{
"unicode": 48,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 191.5,
"bottom": 51.5,
"right": 211.5,
"top": 76.5
}
},
{
"unicode": 49,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.038668118990384616,
"right": 0.33842397836538463,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 212.5,
"bottom": 51.5,
"right": 224.5,
"top": 76.5
}
},
{
"unicode": 50,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.038668118990384616,
"right": 0.64607872596153848,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 225.5,
"bottom": 51.5,
"right": 247.5,
"top": 76.5
}
},
{
"unicode": 51,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 259.5,
"bottom": 51.5,
"right": 279.5,
"top": 76.5
}
},
{
"unicode": 52,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 63.5,
"bottom": 23.5,
"right": 83.5,
"top": 48.5
}
},
{
"unicode": 53,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 84.5,
"bottom": 23.5,
"right": 104.5,
"top": 48.5
}
},
{
"unicode": 54,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 42.5,
"bottom": 23.5,
"right": 62.5,
"top": 48.5
}
},
{
"unicode": 55,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 21.5,
"bottom": 23.5,
"right": 41.5,
"top": 48.5
}
},
{
"unicode": 56,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 105.5,
"bottom": 23.5,
"right": 125.5,
"top": 48.5
}
},
{
"unicode": 57,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.038668118990384616,
"right": 0.57673527644230771,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 0.5,
"bottom": 23.5,
"right": 20.5,
"top": 48.5
}
},
{
"unicode": 58,
"advance": 0.23046875,
"planeBounds": {
"left": -0.030788010817307691,
"bottom": 0.045834585336538461,
"right": 0.1845966045673077,
"top": 0.56891150841346161
},
"atlasBounds": {
"left": 267.5,
"bottom": 239.5,
"right": 274.5,
"top": 256.5
}
},
{
"unicode": 59,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": -0.19247671274038461,
"right": 0.26908052884615385,
"top": 0.57675405649038469
},
"atlasBounds": {
"left": 248.5,
"bottom": 51.5,
"right": 258.5,
"top": 76.5
}
},
{
"unicode": 60,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.11534705528846154,
"right": 0.57673527644230771,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 235.5,
"bottom": 120.5,
"right": 255.5,
"top": 150.5
}
},
{
"unicode": 61,
"advance": 0.5380859375,
"planeBounds": {
"left": -0.030825570913461539,
"bottom": 0.038273737980769232,
"right": 0.49225135216346161,
"top": 0.49981219951923078
},
"atlasBounds": {
"left": 126.5,
"bottom": 33.5,
"right": 143.5,
"top": 48.5
}
},
{
"unicode": 62,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.11534705528846154,
"right": 0.57673527644230771,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 256.5,
"bottom": 120.5,
"right": 276.5,
"top": 150.5
}
},
{
"unicode": 63,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.030863131009615387,
"right": 0.57673527644230771,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 147.5,
"bottom": 49.5,
"right": 167.5,
"top": 76.5
}
},
{
"unicode": 64,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.038668118990384616,
"right": 0.64607872596153848,
"top": 0.73056265024038469
},
"atlasBounds": {
"left": 168.5,
"bottom": 51.5,
"right": 190.5,
"top": 76.5
}
},
{
"unicode": 65,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 0.5,
"bottom": 237.5,
"right": 35.5,
"top": 279.5
}
},
{
"unicode": 66,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 36.5,
"bottom": 237.5,
"right": 71.5,
"top": 279.5
}
},
{
"unicode": 67,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 72.5,
"bottom": 237.5,
"right": 107.5,
"top": 279.5
}
},
{
"unicode": 68,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 108.5,
"bottom": 237.5,
"right": 143.5,
"top": 279.5
}
},
{
"unicode": 69,
"advance": 1,
"planeBounds": {
"left": -0.030881911057692307,
"bottom": -0.030919471153846266,
"right": 0.95373347355769234,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 144.5,
"bottom": 237.5,
"right": 176.5,
"top": 279.5
}
},
{
"unicode": 70,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 177.5,
"bottom": 237.5,
"right": 212.5,
"top": 279.5
}
},
{
"unicode": 71,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 213.5,
"bottom": 237.5,
"right": 248.5,
"top": 279.5
}
},
{
"unicode": 72,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 0.5,
"bottom": 194.5,
"right": 35.5,
"top": 236.5
}
},
{
"unicode": 73,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 36.5,
"bottom": 194.5,
"right": 71.5,
"top": 236.5
}
},
{
"unicode": 74,
"advance": 1,
"planeBounds": {
"left": -0.030881911057692307,
"bottom": -0.030919471153846266,
"right": 0.95373347355769234,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 72.5,
"bottom": 194.5,
"right": 104.5,
"top": 236.5
}
},
{
"unicode": 75,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 105.5,
"bottom": 194.5,
"right": 140.5,
"top": 236.5
}
},
{
"unicode": 76,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 141.5,
"bottom": 194.5,
"right": 176.5,
"top": 236.5
}
},
{
"unicode": 77,
"advance": 1.23046875,
"planeBounds": {
"left": -0.038480318509615495,
"bottom": -0.030919471153846266,
"right": 1.1922889122596152,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 177.5,
"bottom": 194.5,
"right": 217.5,
"top": 236.5
}
},
{
"unicode": 78,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 218.5,
"bottom": 194.5,
"right": 253.5,
"top": 236.5
}
},
{
"unicode": 79,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 0.5,
"bottom": 151.5,
"right": 35.5,
"top": 193.5
}
},
{
"unicode": 80,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 36.5,
"bottom": 151.5,
"right": 71.5,
"top": 193.5
}
},
{
"unicode": 81,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 72.5,
"bottom": 151.5,
"right": 107.5,
"top": 193.5
}
},
{
"unicode": 82,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 108.5,
"bottom": 151.5,
"right": 143.5,
"top": 193.5
}
},
{
"unicode": 83,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 144.5,
"bottom": 151.5,
"right": 179.5,
"top": 193.5
}
},
{
"unicode": 84,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 180.5,
"bottom": 151.5,
"right": 215.5,
"top": 193.5
}
},
{
"unicode": 85,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 216.5,
"bottom": 151.5,
"right": 251.5,
"top": 193.5
}
},
{
"unicode": 86,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 0.5,
"bottom": 108.5,
"right": 35.5,
"top": 150.5
}
},
{
"unicode": 87,
"advance": 1.3076171875,
"planeBounds": {
"left": -0.030919471153846266,
"bottom": -0.030919471153846266,
"right": 1.2613882211538461,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 36.5,
"bottom": 108.5,
"right": 78.5,
"top": 150.5
}
},
{
"unicode": 88,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 79.5,
"bottom": 108.5,
"right": 114.5,
"top": 150.5
}
},
{
"unicode": 89,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 115.5,
"bottom": 108.5,
"right": 150.5,
"top": 150.5
}
},
{
"unicode": 90,
"advance": 1.07666015625,
"planeBounds": {
"left": -0.038461538461538575,
"bottom": -0.030919471153846266,
"right": 1.0384615384615385,
"top": 1.2613882211538461
},
"atlasBounds": {
"left": 151.5,
"bottom": 108.5,
"right": 186.5,
"top": 150.5
}
},
{
"unicode": 91,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": -0.11534705528846154,
"right": 0.26908052884615385,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 213.5,
"bottom": 120.5,
"right": 223.5,
"top": 150.5
}
},
{
"unicode": 92,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 257.5,
"bottom": 80.5,
"right": 279.5,
"top": 107.5
}
},
{
"unicode": 93,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": -0.11534705528846154,
"right": 0.26908052884615385,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 224.5,
"bottom": 120.5,
"right": 234.5,
"top": 150.5
}
},
{
"unicode": 94,
"advance": 0.46142578125,
"planeBounds": {
"left": -0.038630558894230768,
"bottom": 0.43061899038461537,
"right": 0.42290790264423078,
"top": 0.79984975961538463
},
"atlasBounds": {
"left": 166.5,
"bottom": 36.5,
"right": 181.5,
"top": 48.5
}
},
{
"unicode": 95,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.18461538461538463,
"right": 0.64607872596153848,
"top": 0.18461538461538463
},
"atlasBounds": {
"left": 252.5,
"bottom": 155.5,
"right": 274.5,
"top": 167.5
}
},
{
"unicode": 96,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": 0.34589092548076922,
"right": 0.26908052884615385,
"top": 0.80742938701923084
},
"atlasBounds": {
"left": 269.5,
"bottom": 7.5,
"right": 279.5,
"top": 22.5
}
},
{
"unicode": 97,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 115.5,
"bottom": 0.5,
"right": 137.5,
"top": 22.5
}
},
{
"unicode": 98,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 92.5,
"bottom": 0.5,
"right": 114.5,
"top": 22.5
}
},
{
"unicode": 99,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 23.5,
"bottom": 0.5,
"right": 45.5,
"top": 22.5
}
},
{
"unicode": 100,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 111.5,
"bottom": 49.5,
"right": 133.5,
"top": 76.5
}
},
{
"unicode": 101,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 138.5,
"bottom": 0.5,
"right": 160.5,
"top": 22.5
}
},
{
"unicode": 102,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.26915564903846156,
"right": 0.64607872596153848,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 49.5,
"bottom": 77.5,
"right": 71.5,
"top": 107.5
}
},
{
"unicode": 103,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.26915564903846156,
"right": 0.64607872596153848,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 72.5,
"bottom": 77.5,
"right": 94.5,
"top": 107.5
}
},
{
"unicode": 104,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 31.5,
"bottom": 49.5,
"right": 53.5,
"top": 76.5
}
},
{
"unicode": 105,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.030863131009615387,
"right": 0.33842397836538463,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 18.5,
"bottom": 49.5,
"right": 30.5,
"top": 76.5
}
},
{
"unicode": 106,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.26915564903846156,
"right": 0.33842397836538463,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 139.5,
"bottom": 77.5,
"right": 151.5,
"top": 107.5
}
},
{
"unicode": 107,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030863131009615387,
"right": 0.64607872596153848,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 54.5,
"bottom": 49.5,
"right": 76.5,
"top": 76.5
}
},
{
"unicode": 108,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.030863131009615387,
"right": 0.33842397836538463,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 134.5,
"bottom": 49.5,
"right": 146.5,
"top": 76.5
}
},
{
"unicode": 109,
"advance": 0.845703125,
"planeBounds": {
"left": -0.030863131009615387,
"bottom": -0.030844350961538466,
"right": 0.79990609975961546,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 249.5,
"bottom": 257.5,
"right": 276.5,
"top": 279.5
}
},
{
"unicode": 110,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 46.5,
"bottom": 0.5,
"right": 68.5,
"top": 22.5
}
},
{
"unicode": 111,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 0.5,
"bottom": 0.5,
"right": 22.5,
"top": 22.5
}
},
{
"unicode": 112,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.26915564903846156,
"right": 0.64607872596153848,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 152.5,
"bottom": 77.5,
"right": 174.5,
"top": 107.5
}
},
{
"unicode": 113,
"advance": 0.615234375,
"planeBounds": {
"left": -0.038649338942307696,
"bottom": -0.26915564903846156,
"right": 0.57673527644230771,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 118.5,
"bottom": 77.5,
"right": 138.5,
"top": 107.5
}
},
{
"unicode": 114,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.18467172475961538,
"right": 0.64607872596153848,
"top": 0.64609750600961546
},
"atlasBounds": {
"left": 234.5,
"bottom": 80.5,
"right": 256.5,
"top": 107.5
}
},
{
"unicode": 115,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 207.5,
"bottom": 0.5,
"right": 229.5,
"top": 22.5
}
},
{
"unicode": 116,
"advance": 0.5380859375,
"planeBounds": {
"left": -0.030825570913461539,
"bottom": -0.030863131009615387,
"right": 0.49225135216346161,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 0.5,
"bottom": 49.5,
"right": 17.5,
"top": 76.5
}
},
{
"unicode": 117,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 69.5,
"bottom": 0.5,
"right": 91.5,
"top": 22.5
}
},
{
"unicode": 118,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 184.5,
"bottom": 0.5,
"right": 206.5,
"top": 22.5
}
},
{
"unicode": 119,
"advance": 0.76904296875,
"planeBounds": {
"left": -0.038668118990384616,
"bottom": -0.030844350961538466,
"right": 0.73056265024038469,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 254.5,
"bottom": 214.5,
"right": 279.5,
"top": 236.5
}
},
{
"unicode": 120,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.26915564903846156,
"right": 0.64607872596153848,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 95.5,
"bottom": 77.5,
"right": 117.5,
"top": 107.5
}
},
{
"unicode": 121,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.26915564903846156,
"right": 0.64607872596153848,
"top": 0.65392127403846145
},
"atlasBounds": {
"left": 26.5,
"bottom": 77.5,
"right": 48.5,
"top": 107.5
}
},
{
"unicode": 122,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": -0.030844350961538466,
"right": 0.64607872596153848,
"top": 0.64607872596153848
},
"atlasBounds": {
"left": 230.5,
"bottom": 0.5,
"right": 252.5,
"top": 22.5
}
},
{
"unicode": 123,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.11534705528846154,
"right": 0.33842397836538463,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 13.5,
"bottom": 77.5,
"right": 25.5,
"top": 107.5
}
},
{
"unicode": 124,
"advance": 0.3076171875,
"planeBounds": {
"left": -0.038611778846153848,
"bottom": -0.030863131009615387,
"right": 0.26908052884615385,
"top": 0.79990609975961546
},
"atlasBounds": {
"left": 100.5,
"bottom": 49.5,
"right": 110.5,
"top": 76.5
}
},
{
"unicode": 125,
"advance": 0.38427734375,
"planeBounds": {
"left": -0.030806790865384619,
"bottom": -0.11534705528846154,
"right": 0.33842397836538463,
"top": 0.80772986778846156
},
"atlasBounds": {
"left": 0.5,
"bottom": 77.5,
"right": 12.5,
"top": 107.5
}
},
{
"unicode": 126,
"advance": 0.69189453125,
"planeBounds": {
"left": -0.030844350961538466,
"bottom": 0.26900540865384615,
"right": 0.64607872596153848,
"top": 0.57669771634615385
},
"atlasBounds": {
"left": 254.5,
"bottom": 203.5,
"right": 276.5,
"top": 213.5
}
}
],
"kerning": []
}
\ No newline at end of file
assets/antiquity.png

41.1 KiB

......@@ -36,4 +36,8 @@ impl FontMapping {
.get(&id)
.and_then(|item| Some(item.clone()))
}
pub fn get(&self, font: &Handle<KayakFont>) -> Option<u16> {
self.font_ids.get(font).and_then(|font_id| Some(*font_id))
}
}
......@@ -86,8 +86,6 @@ pub fn extract(
1.0
};
// dbg!(&render_primitives);
let mut extracted_quads = Vec::new();
for render_primitive in render_primitives {
match render_primitive {
......
......@@ -25,9 +25,9 @@ fn BlueButton(context: KayakContext, children: Children, styles: Option<Style>)
let (handle1, handle2) = {
let asset_server = world.get_resource::<AssetServer>().unwrap();
let handle1: Handle<bevy::render::texture::Image> =
asset_server.load("../assets/kenny/buttonSquare_blue.png");
let handle2: Handle<bevy::render::texture::Image> =
asset_server.load("../assets/kenny/buttonSquare_blue_pressed.png");
let handle2: Handle<bevy::render::texture::Image> =
asset_server.load("../assets/kenny/buttonSquare_blue.png");
(handle1, handle2)
};
......@@ -88,6 +88,8 @@ fn startup(
commands.spawn_bundle(UICameraBundle::new());
font_mapping.add(asset_server.load("roboto.kayak_font"));
let main_font = asset_server.load("antiquity.kayak_font");
font_mapping.add(main_font.clone());
let handle: Handle<bevy::render::texture::Image> = asset_server.load("kenny/panel_brown.png");
let panel_brown_handle = image_manager.get(&handle);
......@@ -97,6 +99,7 @@ fn startup(
layout_type: StyleProp::Value(LayoutType::Column),
width: StyleProp::Value(Units::Pixels(512.0)),
height: StyleProp::Value(Units::Pixels(512.0)),
min_height: StyleProp::Value(Units::Pixels(0.0)),
padding_left: StyleProp::Value(Units::Stretch(1.0)),
padding_right: StyleProp::Value(Units::Stretch(1.0)),
padding_top: StyleProp::Value(Units::Stretch(1.0)),
......@@ -113,21 +116,21 @@ fn startup(
};
let header_styles = Style {
width: StyleProp::Value(Units::Pixels(432.0)),
height: StyleProp::Value(Units::Pixels(64.0)),
width: StyleProp::Value(Units::Pixels(408.0)),
height: StyleProp::Value(Units::Pixels(42.0)),
bottom: StyleProp::Value(Units::Stretch(1.0)),
..Style::default()
};
let play_button_styles = Style {
width: StyleProp::Value(Units::Pixels(54.0)),
height: StyleProp::Value(Units::Pixels(45.0)),
let text_styles = Style {
width: StyleProp::Value(Units::Pixels(56.0)),
height: StyleProp::Value(Units::Pixels(24.0)),
..Style::default()
};
let options_button_text_styles = Style {
width: StyleProp::Value(Units::Pixels(102.0)),
height: StyleProp::Value(Units::Pixels(45.0)),
width: StyleProp::Value(Units::Pixels(94.0)),
height: StyleProp::Value(Units::Pixels(24.0)),
..Style::default()
};
......@@ -136,6 +139,8 @@ fn startup(
..Style::default()
};
let main_font_id = font_mapping.get(&main_font);
render! {
<App styles={Some(app_styles)}>
<NinePatch
......@@ -150,17 +155,18 @@ fn startup(
>
<Text
styles={Some(header_styles)}
size={50.0}
size={35.0}
content={"Name My Game Plz".to_string()}
font={main_font_id}
/>
<BlueButton>
<Text styles={Some(play_button_styles)} size={30.0} content={"Play".to_string()} />
<Text styles={Some(text_styles)} size={20.0} content={"Play".to_string()} font={main_font_id} />
</BlueButton>
<BlueButton styles={Some(options_button_styles)}>
<Text styles={Some(options_button_text_styles)} size={30.0} content={"Options".to_string()} />
<Text styles={Some(options_button_text_styles)} size={20.0} content={"Options".to_string()} font={main_font_id} />
</BlueButton>
<BlueButton styles={Some(options_button_styles)}>
<Text styles={Some(play_button_styles)} size={30.0} content={"Quit".to_string()} />
<Text styles={Some(text_styles)} size={20.0} content={"Quit".to_string()} font={main_font_id} />
</BlueButton>
</NinePatch>
</App>
......
......@@ -42,6 +42,7 @@ impl Plugin for KayakFontPlugin {
}
pub fn init_font_texture(
mut not_processed: Local<Vec<Handle<KayakFont>>>,
mut font_events: EventReader<AssetEvent<KayakFont>>,
mut images: ResMut<Assets<Image>>,
fonts: Res<Assets<KayakFont>>,
......@@ -50,21 +51,28 @@ pub fn init_font_texture(
for event in font_events.iter() {
match event {
AssetEvent::Created { handle } => {
if let Some(font) = fonts.get(handle) {
if let Some(mut texture) = images.get_mut(&font.atlas_image) {
texture.texture_descriptor.format = TextureFormat::Rgba8Unorm;
texture.sampler_descriptor.min_filter = FilterMode::Linear;
texture.sampler_descriptor.mipmap_filter = FilterMode::Linear;
texture.sampler_descriptor.mag_filter = FilterMode::Linear;
texture.texture_descriptor.usage = TextureUsages::TEXTURE_BINDING
| TextureUsages::COPY_DST
| TextureUsages::COPY_SRC;
}
}
not_processed.push(handle.clone_weak());
}
_ => (),
}
}
let not_processed_fonts = not_processed.drain(..).collect::<Vec<_>>();
for font_handle in not_processed_fonts {
if let Some(font) = fonts.get(&font_handle) {
if let Some(mut texture) = images.get_mut(&font.atlas_image) {
texture.texture_descriptor.format = TextureFormat::Rgba8Unorm;
texture.sampler_descriptor.min_filter = FilterMode::Linear;
texture.sampler_descriptor.mipmap_filter = FilterMode::Linear;
texture.sampler_descriptor.mag_filter = FilterMode::Linear;
texture.texture_descriptor.usage = TextureUsages::TEXTURE_BINDING
| TextureUsages::COPY_DST
| TextureUsages::COPY_SRC;
} else {
not_processed.push(font_handle.clone_weak());
}
}
}
}
#[derive(Default)]
......
......@@ -11,6 +11,8 @@ pub fn Clip(children: Children, styles: Option<Style>) {
render_command: StyleProp::Value(RenderCommand::Clip),
width: StyleProp::Value(Units::Stretch(1.0)),
height: StyleProp::Value(Units::Stretch(1.0)),
min_width: StyleProp::Value(Units::Stretch(1.0)),
min_height: StyleProp::Value(Units::Stretch(1.0)),
..styles.clone().unwrap_or_default()
});
rsx! {
......
......@@ -5,19 +5,14 @@ use kayak_ui::core::{
};
#[widget]
pub fn Text(size: f32, content: String, styles: Option<Style>) {
pub fn Text(size: f32, content: String, styles: Option<Style>, font: Option<u16>) {
let render_command = RenderCommand::Text {
content,
size,
font: 0, // TODO: Support font passing here. Perhaps move to style?
font: font.unwrap_or(0),
};
*styles = Some(Style {
render_command: StyleProp::Value(render_command),
..styles.clone().unwrap_or_default()
});
// rsx! {
// <>
// {}
// </>
// }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment