diff --git a/assets/data/atlas.json b/assets/data/atlas.json new file mode 100644 index 0000000..a1862b6 --- /dev/null +++ b/assets/data/atlas.json @@ -0,0 +1 @@ +{"atlas":{"type":"softmask","size":58.53125,"width":256,"height":256,"yOrigin":"bottom"},"metrics":{"emSize":1,"lineHeight":1.4079999999999999,"ascender":1.105,"descender":-0.30299999999999999,"underlineY":-0.10000000000000001,"underlineThickness":0.050000000000000003},"glyphs":[{"unicode":32,"advance":0.20700000000000002},{"unicode":44,"advance":0.216,"planeBounds":{"left":0.033160437800320339,"bottom":-0.1793913507741591,"right":0.16983956219967969,"top":0.14522156967431932},"atlasBounds":{"left":247.5,"bottom":236.5,"right":255.5,"top":255.5}},{"unicode":45,"advance":0.373,"planeBounds":{"left":0.049820875600640691,"bottom":0.23064602242391885,"right":0.32317912439935936,"top":0.35024025627335825},"atlasBounds":{"left":40.5,"bottom":204.5,"right":56.5,"top":211.5}},{"unicode":46,"advance":0.216,"planeBounds":{"left":0.048202883075280305,"bottom":-0.0085424452749599585,"right":0.16779711692471971,"top":0.14522156967431929},"atlasBounds":{"left":247.5,"bottom":227.5,"right":254.5,"top":236.5}},{"unicode":48,"advance":0.46700000000000003,"planeBounds":{"left":0.019938868126001069,"bottom":-0.02562733582487987,"right":0.44706113187399893,"top":0.70902295782167657},"atlasBounds":{"left":149.5,"bottom":212.5,"right":174.5,"top":255.5}},{"unicode":49,"advance":0.28200000000000003,"planeBounds":{"left":0.003405766150560595,"bottom":-0.0085424452749599585,"right":0.2425942338494394,"top":0.69193806727175666},"atlasBounds":{"left":98.5,"bottom":35.5,"right":112.5,"top":76.5}},{"unicode":50,"advance":0.439,"planeBounds":{"left":0.014481313400961038,"bottom":-0.0085424452749599585,"right":0.42451868659903896,"top":0.70902295782167657},"atlasBounds":{"left":0.5,"bottom":118.5,"right":24.5,"top":160.5}},{"unicode":51,"advance":0.45600000000000002,"planeBounds":{"left":0.0099388681260010742,"bottom":-0.02562733582487987,"right":0.43706113187399892,"top":0.70902295782167657},"atlasBounds":{"left":174.5,"bottom":212.5,"right":199.5,"top":255.5}},{"unicode":52,"advance":0.46600000000000003,"planeBounds":{"left":0.011396422851041102,"bottom":-0.0085424452749599585,"right":0.45560357714895888,"top":0.69193806727175666},"atlasBounds":{"left":112.5,"bottom":35.5,"right":138.5,"top":76.5}},{"unicode":53,"advance":0.45400000000000001,"planeBounds":{"left":0.015438868126001062,"bottom":-0.02562733582487987,"right":0.44256113187399893,"top":0.69193806727175666},"atlasBounds":{"left":24.5,"bottom":118.5,"right":49.5,"top":160.5}},{"unicode":54,"advance":0.45600000000000002,"planeBounds":{"left":0.017938868126001085,"bottom":-0.02562733582487987,"right":0.44506113187399893,"top":0.70902295782167657},"atlasBounds":{"left":199.5,"bottom":212.5,"right":224.5,"top":255.5}},{"unicode":55,"advance":0.38600000000000001,"planeBounds":{"left":0.0040662039508809547,"bottom":-0.0085424452749599585,"right":0.37993379604911914,"top":0.69193806727175666},"atlasBounds":{"left":138.5,"bottom":35.5,"right":160.5,"top":76.5}},{"unicode":56,"advance":0.46400000000000002,"planeBounds":{"left":0.018438868126001075,"bottom":-0.02562733582487987,"right":0.44556113187399893,"top":0.70902295782167657},"atlasBounds":{"left":23.5,"bottom":160.5,"right":48.5,"top":203.5}},{"unicode":57,"advance":0.45600000000000002,"planeBounds":{"left":0.010938868126001085,"bottom":-0.02562733582487987,"right":0.43806113187399892,"top":0.70902295782167657},"atlasBounds":{"left":48.5,"bottom":160.5,"right":73.5,"top":203.5}},{"unicode":58,"advance":0.216,"planeBounds":{"left":0.048202883075280305,"bottom":-0.0085424452749599585,"right":0.16779711692471971,"top":0.52108916177255737},"atlasBounds":{"left":137.5,"bottom":3.5,"right":144.5,"top":34.5}},{"unicode":59,"advance":0.216,"planeBounds":{"left":0.033160437800320339,"bottom":-0.1793913507741591,"right":0.16983956219967969,"top":0.52108916177255737},"atlasBounds":{"left":243.5,"bottom":119.5,"right":251.5,"top":160.5}},{"unicode":65,"advance":0.53500000000000003,"planeBounds":{"left":0.011226641751201286,"bottom":-0.0085424452749599585,"right":0.52377335824879878,"top":0.70902295782167657},"atlasBounds":{"left":76.5,"bottom":76.5,"right":106.5,"top":118.5}},{"unicode":66,"advance":0.495,"planeBounds":{"left":0.04743886812600108,"bottom":-0.0085424452749599585,"right":0.47456113187399895,"top":0.70902295782167657},"atlasBounds":{"left":215.5,"bottom":76.5,"right":240.5,"top":118.5}},{"unicode":67,"advance":0.50800000000000001,"planeBounds":{"left":0.030353977576081149,"bottom":-0.02562733582487987,"right":0.49164602242391886,"top":0.72610784837159648},"atlasBounds":{"left":40.5,"bottom":211.5,"right":67.5,"top":255.5}},{"unicode":68,"advance":0.53500000000000003,"planeBounds":{"left":0.046853977576081153,"bottom":-0.0085424452749599585,"right":0.50814602242391882,"top":0.70902295782167657},"atlasBounds":{"left":26.5,"bottom":34.5,"right":53.5,"top":76.5}},{"unicode":69,"advance":0.45400000000000001,"planeBounds":{"left":0.047023758675920978,"bottom":-0.0085424452749599585,"right":0.43997624132407909,"top":0.70902295782167657},"atlasBounds":{"left":75.5,"bottom":34.5,"right":98.5,"top":76.5}},{"unicode":70,"advance":0.43099999999999999,"planeBounds":{"left":0.044066203950880949,"bottom":-0.0085424452749599585,"right":0.41993379604911912,"top":0.70902295782167657},"atlasBounds":{"left":53.5,"bottom":34.5,"right":75.5,"top":76.5}},{"unicode":71,"advance":0.53500000000000003,"planeBounds":{"left":0.025311532301121192,"bottom":-0.02562733582487987,"right":0.50368846769887887,"top":0.72610784837159648},"atlasBounds":{"left":67.5,"bottom":211.5,"right":95.5,"top":255.5}},{"unicode":72,"advance":0.54100000000000004,"planeBounds":{"left":0.048896422851041121,"bottom":-0.0085424452749599585,"right":0.49310357714895892,"top":0.70902295782167657},"atlasBounds":{"left":0.5,"bottom":34.5,"right":26.5,"top":76.5}},{"unicode":73,"advance":0.21099999999999999,"planeBounds":{"left":0.045702883075280303,"bottom":-0.0085424452749599585,"right":0.16529711692471971,"top":0.70902295782167657},"atlasBounds":{"left":236.5,"bottom":118.5,"right":243.5,"top":160.5}},{"unicode":74,"advance":0.438,"planeBounds":{"left":0.0070237586759209786,"bottom":-0.02562733582487987,"right":0.39997624132407905,"top":0.70902295782167657},"atlasBounds":{"left":73.5,"bottom":160.5,"right":96.5,"top":203.5}},{"unicode":75,"advance":0.50700000000000001,"planeBounds":{"left":0.051396422851041103,"bottom":-0.0085424452749599585,"right":0.49560357714895892,"top":0.70902295782167657},"atlasBounds":{"left":189.5,"bottom":76.5,"right":215.5,"top":118.5}},{"unicode":76,"advance":0.42999999999999999,"planeBounds":{"left":0.047566203950880938,"bottom":-0.0085424452749599585,"right":0.42343379604911913,"top":0.70902295782167657},"atlasBounds":{"left":167.5,"bottom":76.5,"right":189.5,"top":118.5}},{"unicode":77,"advance":0.68200000000000005,"planeBounds":{"left":0.050556860651361446,"bottom":-0.0085424452749599585,"right":0.6314431393486386,"top":0.70902295782167657},"atlasBounds":{"left":133.5,"bottom":76.5,"right":167.5,"top":118.5}},{"unicode":78,"advance":0.56000000000000005,"planeBounds":{"left":0.048853977576081141,"bottom":-0.0085424452749599585,"right":0.51014602242391882,"top":0.70902295782167657},"atlasBounds":{"left":106.5,"bottom":76.5,"right":133.5,"top":118.5}},{"unicode":79,"advance":0.53500000000000003,"planeBounds":{"left":0.028311532301121205,"bottom":-0.02562733582487987,"right":0.50668846769887887,"top":0.72610784837159648},"atlasBounds":{"left":95.5,"bottom":211.5,"right":123.5,"top":255.5}},{"unicode":80,"advance":0.47500000000000003,"planeBounds":{"left":0.047481313400961032,"bottom":-0.0085424452749599585,"right":0.45751868659903899,"top":0.70902295782167657},"atlasBounds":{"left":52.5,"bottom":76.5,"right":76.5,"top":118.5}},{"unicode":81,"advance":0.53500000000000003,"planeBounds":{"left":0.028311532301121205,"bottom":-0.14522156967431929,"right":0.50668846769887887,"top":0.72610784837159636},"atlasBounds":{"left":12.5,"bottom":204.5,"right":40.5,"top":255.5}},{"unicode":82,"advance":0.5,"planeBounds":{"left":0.046396422851041126,"bottom":-0.0085424452749599585,"right":0.49060357714895891,"top":0.70902295782167657},"atlasBounds":{"left":26.5,"bottom":76.5,"right":52.5,"top":118.5}},{"unicode":83,"advance":0.47500000000000003,"planeBounds":{"left":0.012396422851041127,"bottom":-0.02562733582487987,"right":0.45660357714895888,"top":0.72610784837159648},"atlasBounds":{"left":123.5,"bottom":211.5,"right":149.5,"top":255.5}},{"unicode":84,"advance":0.46600000000000003,"planeBounds":{"left":0.010896422851041121,"bottom":-0.0085424452749599585,"right":0.45510357714895888,"top":0.70902295782167657},"atlasBounds":{"left":0.5,"bottom":76.5,"right":26.5,"top":118.5}},{"unicode":85,"advance":0.52800000000000002,"planeBounds":{"left":0.043396422851041103,"bottom":-0.02562733582487987,"right":0.48760357714895891,"top":0.70902295782167657},"atlasBounds":{"left":121.5,"bottom":160.5,"right":147.5,"top":203.5}},{"unicode":86,"advance":0.52200000000000002,"planeBounds":{"left":0.0047266417512012993,"bottom":-0.0085424452749599585,"right":0.51727335824879883,"top":0.70902295782167657},"atlasBounds":{"left":184.5,"bottom":118.5,"right":214.5,"top":160.5}},{"unicode":87,"advance":0.76800000000000002,"planeBounds":{"left":0.0081324079017619059,"bottom":-0.0085424452749599585,"right":0.75986759209823829,"top":0.70902295782167657},"atlasBounds":{"left":140.5,"bottom":118.5,"right":184.5,"top":160.5}},{"unicode":88,"advance":0.51300000000000001,"planeBounds":{"left":0.0087690870261612347,"bottom":-0.0085424452749599585,"right":0.50423091297383882,"top":0.70902295782167657},"atlasBounds":{"left":111.5,"bottom":118.5,"right":140.5,"top":160.5}},{"unicode":89,"advance":0.52400000000000002,"planeBounds":{"left":0.0057266417512012941,"bottom":-0.0085424452749599585,"right":0.51827335824879883,"top":0.70902295782167657},"atlasBounds":{"left":81.5,"bottom":118.5,"right":111.5,"top":160.5}},{"unicode":90,"advance":0.45200000000000001,"planeBounds":{"left":0.011438868126001062,"bottom":-0.0085424452749599585,"right":0.43856113187399892,"top":0.70902295782167657},"atlasBounds":{"left":56.5,"bottom":118.5,"right":81.5,"top":160.5}},{"unicode":97,"advance":0.42699999999999999,"planeBounds":{"left":0.0090237586759209926,"bottom":-0.02562733582487987,"right":0.40197624132407905,"top":0.52108916177255737},"atlasBounds":{"left":114.5,"bottom":2.5,"right":137.5,"top":34.5}},{"unicode":98,"advance":0.45700000000000002,"planeBounds":{"left":0.043023758675920981,"bottom":-0.02562733582487987,"right":0.43597624132407908,"top":0.70902295782167657},"atlasBounds":{"left":147.5,"bottom":160.5,"right":170.5,"top":203.5}},{"unicode":99,"advance":0.42299999999999999,"planeBounds":{"left":0.018023758675921001,"bottom":-0.02562733582487987,"right":0.41097624132407906,"top":0.52108916177255737},"atlasBounds":{"left":24.5,"bottom":2.5,"right":47.5,"top":34.5}},{"unicode":100,"advance":0.45600000000000002,"planeBounds":{"left":0.021023758675920986,"bottom":-0.02562733582487987,"right":0.41397624132407906,"top":0.70902295782167657},"atlasBounds":{"left":209.5,"bottom":160.5,"right":232.5,"top":203.5}},{"unicode":101,"advance":0.42999999999999999,"planeBounds":{"left":0.021023758675920986,"bottom":-0.02562733582487987,"right":0.41397624132407906,"top":0.52108916177255737},"atlasBounds":{"left":69.5,"bottom":2.5,"right":92.5,"top":34.5}},{"unicode":102,"advance":0.28300000000000003,"planeBounds":{"left":0.0093208756006406789,"bottom":-0.0085424452749599585,"right":0.28267912439935938,"top":0.72610784837159648},"atlasBounds":{"left":193.5,"bottom":160.5,"right":209.5,"top":203.5}},{"unicode":103,"advance":0.44800000000000001,"planeBounds":{"left":0.020523758675920975,"bottom":-0.21356113187399894,"right":0.41347624132407906,"top":0.52108916177255737},"atlasBounds":{"left":170.5,"bottom":160.5,"right":193.5,"top":203.5}},{"unicode":104,"advance":0.44900000000000001,"planeBounds":{"left":0.039566203950880938,"bottom":-0.0085424452749599585,"right":0.41543379604911912,"top":0.70902295782167657},"atlasBounds":{"left":214.5,"bottom":118.5,"right":236.5,"top":160.5}},{"unicode":105,"advance":0.184,"planeBounds":{"left":0.032202883075280304,"bottom":-0.0085424452749599585,"right":0.15179711692471973,"top":0.67485317672183676},"atlasBounds":{"left":176.5,"bottom":36.5,"right":183.5,"top":76.5}},{"unicode":106,"advance":0.187,"planeBounds":{"left":-0.051009343299519477,"bottom":-0.21356113187399894,"right":0.15400934329951949,"top":0.67485317672183676},"atlasBounds":{"left":0.5,"bottom":203.5,"right":12.5,"top":255.5}},{"unicode":107,"advance":0.434,"planeBounds":{"left":0.042023758675920987,"bottom":-0.0085424452749599585,"right":0.43497624132407908,"top":0.70902295782167657},"atlasBounds":{"left":232.5,"bottom":161.5,"right":255.5,"top":203.5}},{"unicode":108,"advance":0.19,"planeBounds":{"left":0.035702883075280308,"bottom":-0.0085424452749599585,"right":0.15529711692471973,"top":0.70902295782167657},"atlasBounds":{"left":49.5,"bottom":118.5,"right":56.5,"top":160.5}},{"unicode":109,"advance":0.69000000000000006,"planeBounds":{"left":0.039471970101441538,"bottom":-0.0085424452749599585,"right":0.65452802989855852,"top":0.52108916177255737},"atlasBounds":{"left":169.5,"bottom":3.5,"right":205.5,"top":34.5}},{"unicode":110,"advance":0.44600000000000001,"planeBounds":{"left":0.036566203950880942,"bottom":-0.0085424452749599585,"right":0.41243379604911912,"top":0.52108916177255737},"atlasBounds":{"left":183.5,"bottom":45.5,"right":205.5,"top":76.5}},{"unicode":111,"advance":0.442,"planeBounds":{"left":0.015981313400961025,"bottom":-0.02562733582487987,"right":0.42601868659903896,"top":0.52108916177255737},"atlasBounds":{"left":0.5,"bottom":2.5,"right":24.5,"top":34.5}},{"unicode":112,"advance":0.45700000000000002,"planeBounds":{"left":0.043023758675920981,"bottom":-0.21356113187399894,"right":0.43597624132407908,"top":0.52108916177255737},"atlasBounds":{"left":0.5,"bottom":160.5,"right":23.5,"top":203.5}},{"unicode":113,"advance":0.45500000000000002,"planeBounds":{"left":0.021023758675920986,"bottom":-0.21356113187399894,"right":0.41397624132407906,"top":0.52108916177255737},"atlasBounds":{"left":224.5,"bottom":212.5,"right":247.5,"top":255.5}},{"unicode":114,"advance":0.29799999999999999,"planeBounds":{"left":0.038363320875600654,"bottom":-0.0085424452749599585,"right":0.29463667912439939,"top":0.52108916177255737},"atlasBounds":{"left":240.5,"bottom":87.5,"right":255.5,"top":118.5}},{"unicode":115,"advance":0.40000000000000002,"planeBounds":{"left":0.01106620395088093,"bottom":-0.02562733582487987,"right":0.38693379604911909,"top":0.52108916177255737},"atlasBounds":{"left":47.5,"bottom":2.5,"right":69.5,"top":34.5}},{"unicode":116,"advance":0.29299999999999998,"planeBounds":{"left":0.0043208756006406848,"bottom":-0.02562733582487987,"right":0.27767912439935938,"top":0.65776828617191674},"atlasBounds":{"left":160.5,"bottom":36.5,"right":176.5,"top":76.5}},{"unicode":117,"advance":0.44,"planeBounds":{"left":0.029566203950880946,"bottom":-0.02562733582487987,"right":0.40543379604911911,"top":0.52108916177255737},"atlasBounds":{"left":92.5,"bottom":2.5,"right":114.5,"top":34.5}},{"unicode":118,"advance":0.41899999999999998,"planeBounds":{"left":-0.0040611318739989192,"bottom":-0.0085424452749599585,"right":0.42306113187399896,"top":0.52108916177255737},"atlasBounds":{"left":144.5,"bottom":3.5,"right":169.5,"top":34.5}},{"unicode":119,"advance":0.65800000000000003,"planeBounds":{"left":0.004387079551521623,"bottom":-0.0085424452749599585,"right":0.65361292044847852,"top":0.52108916177255737},"atlasBounds":{"left":205.5,"bottom":45.5,"right":243.5,"top":76.5}},{"unicode":120,"advance":0.41200000000000003,"planeBounds":{"left":0.00098131340096103861,"bottom":-0.0085424452749599585,"right":0.41101868659903901,"top":0.52108916177255737},"atlasBounds":{"left":205.5,"bottom":3.5,"right":229.5,"top":34.5}},{"unicode":121,"advance":0.42099999999999999,"planeBounds":{"left":-0.0025611318739989439,"bottom":-0.21356113187399894,"right":0.42456113187399896,"top":0.52108916177255737},"atlasBounds":{"left":96.5,"bottom":160.5,"right":121.5,"top":203.5}},{"unicode":122,"advance":0.38300000000000001,"planeBounds":{"left":0.002066203950880949,"bottom":-0.0085424452749599585,"right":0.37793379604911914,"top":0.52108916177255737},"atlasBounds":{"left":229.5,"bottom":3.5,"right":251.5,"top":34.5}}],"kerning":[]} diff --git a/assets/shaders/gui.frag.spv b/assets/shaders/gui.frag.spv index 93f5a34..6568e89 100644 Binary files a/assets/shaders/gui.frag.spv and b/assets/shaders/gui.frag.spv differ diff --git a/assets/shaders/gui.vert.spv b/assets/shaders/gui.vert.spv index 9e99c15..2884b57 100644 Binary files a/assets/shaders/gui.vert.spv and b/assets/shaders/gui.vert.spv differ diff --git a/build.sh b/build.sh index 99fa38e..100782f 100755 --- a/build.sh +++ b/build.sh @@ -99,8 +99,6 @@ if ! [ -f build/atlas.png ]; then msdf-atlas-gen -font assets/fonts/NuberNextCondensed-DemiBold.otf -dimensions 256 256 -type softmask -imageout build/atlas.png -json build/atlas.json fi -if ! [ -f assets/textures/atlas.png ]; then - cp build/atlas.png assets/textures/atlas.png - mkdir -p assets/data - cp build/atlas.json assets/data/atlas.json -fi +cp build/atlas.png assets/textures/atlas.png +mkdir -p assets/data +cp build/atlas.json assets/data/atlas.json diff --git a/src/codegen/fonts.d b/src/codegen/fonts.d index 334aafd..9c2fc9d 100644 --- a/src/codegen/fonts.d +++ b/src/codegen/fonts.d @@ -24,10 +24,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.179391, plane_right: 0.169840, plane_top: 0.145222, - atlas_left: 0.033160, - atlas_bottom: -0.179391, - atlas_right: 0.169840, - atlas_top: 0.145222, + atlas_left: 247.500000, + atlas_bottom: 19.500000, + atlas_right: 255.500000, + atlas_top: 0.500000, }, { ch: '-', @@ -36,10 +36,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: 0.230646, plane_right: 0.323179, plane_top: 0.350240, - atlas_left: 0.049821, - atlas_bottom: 0.230646, - atlas_right: 0.323179, - atlas_top: 0.350240, + atlas_left: 40.500000, + atlas_bottom: 51.500000, + atlas_right: 56.500000, + atlas_top: 44.500000, }, { ch: '.', @@ -48,10 +48,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.167797, plane_top: 0.145222, - atlas_left: 0.048203, - atlas_bottom: -0.008542, - atlas_right: 0.167797, - atlas_top: 0.145222, + atlas_left: 247.500000, + atlas_bottom: 28.500000, + atlas_right: 254.500000, + atlas_top: 19.500000, }, { ch: '0', @@ -60,10 +60,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.447061, plane_top: 0.709023, - atlas_left: 0.019939, - atlas_bottom: -0.025627, - atlas_right: 0.447061, - atlas_top: 0.709023, + atlas_left: 149.500000, + atlas_bottom: 43.500000, + atlas_right: 174.500000, + atlas_top: 0.500000, }, { ch: '1', @@ -72,10 +72,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.242594, plane_top: 0.691938, - atlas_left: 0.003406, - atlas_bottom: -0.008542, - atlas_right: 0.242594, - atlas_top: 0.691938, + atlas_left: 98.500000, + atlas_bottom: 220.500000, + atlas_right: 112.500000, + atlas_top: 179.500000, }, { ch: '2', @@ -84,10 +84,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.424519, plane_top: 0.709023, - atlas_left: 0.014481, - atlas_bottom: -0.008542, - atlas_right: 0.424519, - atlas_top: 0.709023, + atlas_left: 0.500000, + atlas_bottom: 137.500000, + atlas_right: 24.500000, + atlas_top: 95.500000, }, { ch: '3', @@ -96,10 +96,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.437061, plane_top: 0.709023, - atlas_left: 0.009939, - atlas_bottom: -0.025627, - atlas_right: 0.437061, - atlas_top: 0.709023, + atlas_left: 174.500000, + atlas_bottom: 43.500000, + atlas_right: 199.500000, + atlas_top: 0.500000, }, { ch: '4', @@ -108,10 +108,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.455604, plane_top: 0.691938, - atlas_left: 0.011396, - atlas_bottom: -0.008542, - atlas_right: 0.455604, - atlas_top: 0.691938, + atlas_left: 112.500000, + atlas_bottom: 220.500000, + atlas_right: 138.500000, + atlas_top: 179.500000, }, { ch: '5', @@ -120,10 +120,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.442561, plane_top: 0.691938, - atlas_left: 0.015439, - atlas_bottom: -0.025627, - atlas_right: 0.442561, - atlas_top: 0.691938, + atlas_left: 24.500000, + atlas_bottom: 137.500000, + atlas_right: 49.500000, + atlas_top: 95.500000, }, { ch: '6', @@ -132,10 +132,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.445061, plane_top: 0.709023, - atlas_left: 0.017939, - atlas_bottom: -0.025627, - atlas_right: 0.445061, - atlas_top: 0.709023, + atlas_left: 199.500000, + atlas_bottom: 43.500000, + atlas_right: 224.500000, + atlas_top: 0.500000, }, { ch: '7', @@ -144,10 +144,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.379934, plane_top: 0.691938, - atlas_left: 0.004066, - atlas_bottom: -0.008542, - atlas_right: 0.379934, - atlas_top: 0.691938, + atlas_left: 138.500000, + atlas_bottom: 220.500000, + atlas_right: 160.500000, + atlas_top: 179.500000, }, { ch: '8', @@ -156,10 +156,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.445561, plane_top: 0.709023, - atlas_left: 0.018439, - atlas_bottom: -0.025627, - atlas_right: 0.445561, - atlas_top: 0.709023, + atlas_left: 23.500000, + atlas_bottom: 95.500000, + atlas_right: 48.500000, + atlas_top: 52.500000, }, { ch: '9', @@ -168,10 +168,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.438061, plane_top: 0.709023, - atlas_left: 0.010939, - atlas_bottom: -0.025627, - atlas_right: 0.438061, - atlas_top: 0.709023, + atlas_left: 48.500000, + atlas_bottom: 95.500000, + atlas_right: 73.500000, + atlas_top: 52.500000, }, { ch: ':', @@ -180,10 +180,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.167797, plane_top: 0.521089, - atlas_left: 0.048203, - atlas_bottom: -0.008542, - atlas_right: 0.167797, - atlas_top: 0.521089, + atlas_left: 137.500000, + atlas_bottom: 252.500000, + atlas_right: 144.500000, + atlas_top: 221.500000, }, { ch: ';', @@ -192,10 +192,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.179391, plane_right: 0.169840, plane_top: 0.521089, - atlas_left: 0.033160, - atlas_bottom: -0.179391, - atlas_right: 0.169840, - atlas_top: 0.521089, + atlas_left: 243.500000, + atlas_bottom: 136.500000, + atlas_right: 251.500000, + atlas_top: 95.500000, }, { ch: 'A', @@ -204,10 +204,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.523773, plane_top: 0.709023, - atlas_left: 0.011227, - atlas_bottom: -0.008542, - atlas_right: 0.523773, - atlas_top: 0.709023, + atlas_left: 76.500000, + atlas_bottom: 179.500000, + atlas_right: 106.500000, + atlas_top: 137.500000, }, { ch: 'B', @@ -216,10 +216,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.474561, plane_top: 0.709023, - atlas_left: 0.047439, - atlas_bottom: -0.008542, - atlas_right: 0.474561, - atlas_top: 0.709023, + atlas_left: 215.500000, + atlas_bottom: 179.500000, + atlas_right: 240.500000, + atlas_top: 137.500000, }, { ch: 'C', @@ -228,10 +228,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.491646, plane_top: 0.726108, - atlas_left: 0.030354, - atlas_bottom: -0.025627, - atlas_right: 0.491646, - atlas_top: 0.726108, + atlas_left: 40.500000, + atlas_bottom: 44.500000, + atlas_right: 67.500000, + atlas_top: 0.500000, }, { ch: 'D', @@ -240,10 +240,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.508146, plane_top: 0.709023, - atlas_left: 0.046854, - atlas_bottom: -0.008542, - atlas_right: 0.508146, - atlas_top: 0.709023, + atlas_left: 26.500000, + atlas_bottom: 221.500000, + atlas_right: 53.500000, + atlas_top: 179.500000, }, { ch: 'E', @@ -252,10 +252,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.439976, plane_top: 0.709023, - atlas_left: 0.047024, - atlas_bottom: -0.008542, - atlas_right: 0.439976, - atlas_top: 0.709023, + atlas_left: 75.500000, + atlas_bottom: 221.500000, + atlas_right: 98.500000, + atlas_top: 179.500000, }, { ch: 'F', @@ -264,10 +264,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.419934, plane_top: 0.709023, - atlas_left: 0.044066, - atlas_bottom: -0.008542, - atlas_right: 0.419934, - atlas_top: 0.709023, + atlas_left: 53.500000, + atlas_bottom: 221.500000, + atlas_right: 75.500000, + atlas_top: 179.500000, }, { ch: 'G', @@ -276,10 +276,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.503688, plane_top: 0.726108, - atlas_left: 0.025312, - atlas_bottom: -0.025627, - atlas_right: 0.503688, - atlas_top: 0.726108, + atlas_left: 67.500000, + atlas_bottom: 44.500000, + atlas_right: 95.500000, + atlas_top: 0.500000, }, { ch: 'H', @@ -288,10 +288,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.493104, plane_top: 0.709023, - atlas_left: 0.048896, - atlas_bottom: -0.008542, - atlas_right: 0.493104, - atlas_top: 0.709023, + atlas_left: 0.500000, + atlas_bottom: 221.500000, + atlas_right: 26.500000, + atlas_top: 179.500000, }, { ch: 'I', @@ -300,10 +300,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.165297, plane_top: 0.709023, - atlas_left: 0.045703, - atlas_bottom: -0.008542, - atlas_right: 0.165297, - atlas_top: 0.709023, + atlas_left: 236.500000, + atlas_bottom: 137.500000, + atlas_right: 243.500000, + atlas_top: 95.500000, }, { ch: 'J', @@ -312,10 +312,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.399976, plane_top: 0.709023, - atlas_left: 0.007024, - atlas_bottom: -0.025627, - atlas_right: 0.399976, - atlas_top: 0.709023, + atlas_left: 73.500000, + atlas_bottom: 95.500000, + atlas_right: 96.500000, + atlas_top: 52.500000, }, { ch: 'K', @@ -324,10 +324,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.495604, plane_top: 0.709023, - atlas_left: 0.051396, - atlas_bottom: -0.008542, - atlas_right: 0.495604, - atlas_top: 0.709023, + atlas_left: 189.500000, + atlas_bottom: 179.500000, + atlas_right: 215.500000, + atlas_top: 137.500000, }, { ch: 'L', @@ -336,10 +336,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.423434, plane_top: 0.709023, - atlas_left: 0.047566, - atlas_bottom: -0.008542, - atlas_right: 0.423434, - atlas_top: 0.709023, + atlas_left: 167.500000, + atlas_bottom: 179.500000, + atlas_right: 189.500000, + atlas_top: 137.500000, }, { ch: 'M', @@ -348,10 +348,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.631443, plane_top: 0.709023, - atlas_left: 0.050557, - atlas_bottom: -0.008542, - atlas_right: 0.631443, - atlas_top: 0.709023, + atlas_left: 133.500000, + atlas_bottom: 179.500000, + atlas_right: 167.500000, + atlas_top: 137.500000, }, { ch: 'N', @@ -360,10 +360,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.510146, plane_top: 0.709023, - atlas_left: 0.048854, - atlas_bottom: -0.008542, - atlas_right: 0.510146, - atlas_top: 0.709023, + atlas_left: 106.500000, + atlas_bottom: 179.500000, + atlas_right: 133.500000, + atlas_top: 137.500000, }, { ch: 'O', @@ -372,10 +372,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.506688, plane_top: 0.726108, - atlas_left: 0.028312, - atlas_bottom: -0.025627, - atlas_right: 0.506688, - atlas_top: 0.726108, + atlas_left: 95.500000, + atlas_bottom: 44.500000, + atlas_right: 123.500000, + atlas_top: 0.500000, }, { ch: 'P', @@ -384,10 +384,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.457519, plane_top: 0.709023, - atlas_left: 0.047481, - atlas_bottom: -0.008542, - atlas_right: 0.457519, - atlas_top: 0.709023, + atlas_left: 52.500000, + atlas_bottom: 179.500000, + atlas_right: 76.500000, + atlas_top: 137.500000, }, { ch: 'Q', @@ -396,10 +396,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.145222, plane_right: 0.506688, plane_top: 0.726108, - atlas_left: 0.028312, - atlas_bottom: -0.145222, - atlas_right: 0.506688, - atlas_top: 0.726108, + atlas_left: 12.500000, + atlas_bottom: 51.500000, + atlas_right: 40.500000, + atlas_top: 0.500000, }, { ch: 'R', @@ -408,10 +408,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.490604, plane_top: 0.709023, - atlas_left: 0.046396, - atlas_bottom: -0.008542, - atlas_right: 0.490604, - atlas_top: 0.709023, + atlas_left: 26.500000, + atlas_bottom: 179.500000, + atlas_right: 52.500000, + atlas_top: 137.500000, }, { ch: 'S', @@ -420,10 +420,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.456604, plane_top: 0.726108, - atlas_left: 0.012396, - atlas_bottom: -0.025627, - atlas_right: 0.456604, - atlas_top: 0.726108, + atlas_left: 123.500000, + atlas_bottom: 44.500000, + atlas_right: 149.500000, + atlas_top: 0.500000, }, { ch: 'T', @@ -432,10 +432,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.455104, plane_top: 0.709023, - atlas_left: 0.010896, - atlas_bottom: -0.008542, - atlas_right: 0.455104, - atlas_top: 0.709023, + atlas_left: 0.500000, + atlas_bottom: 179.500000, + atlas_right: 26.500000, + atlas_top: 137.500000, }, { ch: 'U', @@ -444,10 +444,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.487604, plane_top: 0.709023, - atlas_left: 0.043396, - atlas_bottom: -0.025627, - atlas_right: 0.487604, - atlas_top: 0.709023, + atlas_left: 121.500000, + atlas_bottom: 95.500000, + atlas_right: 147.500000, + atlas_top: 52.500000, }, { ch: 'V', @@ -456,10 +456,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.517273, plane_top: 0.709023, - atlas_left: 0.004727, - atlas_bottom: -0.008542, - atlas_right: 0.517273, - atlas_top: 0.709023, + atlas_left: 184.500000, + atlas_bottom: 137.500000, + atlas_right: 214.500000, + atlas_top: 95.500000, }, { ch: 'W', @@ -468,10 +468,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.759868, plane_top: 0.709023, - atlas_left: 0.008132, - atlas_bottom: -0.008542, - atlas_right: 0.759868, - atlas_top: 0.709023, + atlas_left: 140.500000, + atlas_bottom: 137.500000, + atlas_right: 184.500000, + atlas_top: 95.500000, }, { ch: 'X', @@ -480,10 +480,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.504231, plane_top: 0.709023, - atlas_left: 0.008769, - atlas_bottom: -0.008542, - atlas_right: 0.504231, - atlas_top: 0.709023, + atlas_left: 111.500000, + atlas_bottom: 137.500000, + atlas_right: 140.500000, + atlas_top: 95.500000, }, { ch: 'Y', @@ -492,10 +492,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.518273, plane_top: 0.709023, - atlas_left: 0.005727, - atlas_bottom: -0.008542, - atlas_right: 0.518273, - atlas_top: 0.709023, + atlas_left: 81.500000, + atlas_bottom: 137.500000, + atlas_right: 111.500000, + atlas_top: 95.500000, }, { ch: 'Z', @@ -504,10 +504,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.438561, plane_top: 0.709023, - atlas_left: 0.011439, - atlas_bottom: -0.008542, - atlas_right: 0.438561, - atlas_top: 0.709023, + atlas_left: 56.500000, + atlas_bottom: 137.500000, + atlas_right: 81.500000, + atlas_top: 95.500000, }, { ch: 'a', @@ -516,10 +516,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.401976, plane_top: 0.521089, - atlas_left: 0.009024, - atlas_bottom: -0.025627, - atlas_right: 0.401976, - atlas_top: 0.521089, + atlas_left: 114.500000, + atlas_bottom: 253.500000, + atlas_right: 137.500000, + atlas_top: 221.500000, }, { ch: 'b', @@ -528,10 +528,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.435976, plane_top: 0.709023, - atlas_left: 0.043024, - atlas_bottom: -0.025627, - atlas_right: 0.435976, - atlas_top: 0.709023, + atlas_left: 147.500000, + atlas_bottom: 95.500000, + atlas_right: 170.500000, + atlas_top: 52.500000, }, { ch: 'c', @@ -540,10 +540,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.410976, plane_top: 0.521089, - atlas_left: 0.018024, - atlas_bottom: -0.025627, - atlas_right: 0.410976, - atlas_top: 0.521089, + atlas_left: 24.500000, + atlas_bottom: 253.500000, + atlas_right: 47.500000, + atlas_top: 221.500000, }, { ch: 'd', @@ -552,10 +552,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.413976, plane_top: 0.709023, - atlas_left: 0.021024, - atlas_bottom: -0.025627, - atlas_right: 0.413976, - atlas_top: 0.709023, + atlas_left: 209.500000, + atlas_bottom: 95.500000, + atlas_right: 232.500000, + atlas_top: 52.500000, }, { ch: 'e', @@ -564,10 +564,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.413976, plane_top: 0.521089, - atlas_left: 0.021024, - atlas_bottom: -0.025627, - atlas_right: 0.413976, - atlas_top: 0.521089, + atlas_left: 69.500000, + atlas_bottom: 253.500000, + atlas_right: 92.500000, + atlas_top: 221.500000, }, { ch: 'f', @@ -576,10 +576,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.282679, plane_top: 0.726108, - atlas_left: 0.009321, - atlas_bottom: -0.008542, - atlas_right: 0.282679, - atlas_top: 0.726108, + atlas_left: 193.500000, + atlas_bottom: 95.500000, + atlas_right: 209.500000, + atlas_top: 52.500000, }, { ch: 'g', @@ -588,10 +588,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.213561, plane_right: 0.413476, plane_top: 0.521089, - atlas_left: 0.020524, - atlas_bottom: -0.213561, - atlas_right: 0.413476, - atlas_top: 0.521089, + atlas_left: 170.500000, + atlas_bottom: 95.500000, + atlas_right: 193.500000, + atlas_top: 52.500000, }, { ch: 'h', @@ -600,10 +600,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.415434, plane_top: 0.709023, - atlas_left: 0.039566, - atlas_bottom: -0.008542, - atlas_right: 0.415434, - atlas_top: 0.709023, + atlas_left: 214.500000, + atlas_bottom: 137.500000, + atlas_right: 236.500000, + atlas_top: 95.500000, }, { ch: 'i', @@ -612,10 +612,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.151797, plane_top: 0.674853, - atlas_left: 0.032203, - atlas_bottom: -0.008542, - atlas_right: 0.151797, - atlas_top: 0.674853, + atlas_left: 176.500000, + atlas_bottom: 219.500000, + atlas_right: 183.500000, + atlas_top: 179.500000, }, { ch: 'j', @@ -624,10 +624,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.213561, plane_right: 0.154009, plane_top: 0.674853, - atlas_left: -0.051009, - atlas_bottom: -0.213561, - atlas_right: 0.154009, - atlas_top: 0.674853, + atlas_left: 0.500000, + atlas_bottom: 52.500000, + atlas_right: 12.500000, + atlas_top: 0.500000, }, { ch: 'k', @@ -636,10 +636,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.434976, plane_top: 0.709023, - atlas_left: 0.042024, - atlas_bottom: -0.008542, - atlas_right: 0.434976, - atlas_top: 0.709023, + atlas_left: 232.500000, + atlas_bottom: 94.500000, + atlas_right: 255.500000, + atlas_top: 52.500000, }, { ch: 'l', @@ -648,10 +648,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.155297, plane_top: 0.709023, - atlas_left: 0.035703, - atlas_bottom: -0.008542, - atlas_right: 0.155297, - atlas_top: 0.709023, + atlas_left: 49.500000, + atlas_bottom: 137.500000, + atlas_right: 56.500000, + atlas_top: 95.500000, }, { ch: 'm', @@ -660,10 +660,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.654528, plane_top: 0.521089, - atlas_left: 0.039472, - atlas_bottom: -0.008542, - atlas_right: 0.654528, - atlas_top: 0.521089, + atlas_left: 169.500000, + atlas_bottom: 252.500000, + atlas_right: 205.500000, + atlas_top: 221.500000, }, { ch: 'n', @@ -672,10 +672,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.412434, plane_top: 0.521089, - atlas_left: 0.036566, - atlas_bottom: -0.008542, - atlas_right: 0.412434, - atlas_top: 0.521089, + atlas_left: 183.500000, + atlas_bottom: 210.500000, + atlas_right: 205.500000, + atlas_top: 179.500000, }, { ch: 'o', @@ -684,10 +684,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.426019, plane_top: 0.521089, - atlas_left: 0.015981, - atlas_bottom: -0.025627, - atlas_right: 0.426019, - atlas_top: 0.521089, + atlas_left: 0.500000, + atlas_bottom: 253.500000, + atlas_right: 24.500000, + atlas_top: 221.500000, }, { ch: 'p', @@ -696,10 +696,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.213561, plane_right: 0.435976, plane_top: 0.521089, - atlas_left: 0.043024, - atlas_bottom: -0.213561, - atlas_right: 0.435976, - atlas_top: 0.521089, + atlas_left: 0.500000, + atlas_bottom: 95.500000, + atlas_right: 23.500000, + atlas_top: 52.500000, }, { ch: 'q', @@ -708,10 +708,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.213561, plane_right: 0.413976, plane_top: 0.521089, - atlas_left: 0.021024, - atlas_bottom: -0.213561, - atlas_right: 0.413976, - atlas_top: 0.521089, + atlas_left: 224.500000, + atlas_bottom: 43.500000, + atlas_right: 247.500000, + atlas_top: 0.500000, }, { ch: 'r', @@ -720,10 +720,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.294637, plane_top: 0.521089, - atlas_left: 0.038363, - atlas_bottom: -0.008542, - atlas_right: 0.294637, - atlas_top: 0.521089, + atlas_left: 240.500000, + atlas_bottom: 168.500000, + atlas_right: 255.500000, + atlas_top: 137.500000, }, { ch: 's', @@ -732,10 +732,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.386934, plane_top: 0.521089, - atlas_left: 0.011066, - atlas_bottom: -0.025627, - atlas_right: 0.386934, - atlas_top: 0.521089, + atlas_left: 47.500000, + atlas_bottom: 253.500000, + atlas_right: 69.500000, + atlas_top: 221.500000, }, { ch: 't', @@ -744,10 +744,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.277679, plane_top: 0.657768, - atlas_left: 0.004321, - atlas_bottom: -0.025627, - atlas_right: 0.277679, - atlas_top: 0.657768, + atlas_left: 160.500000, + atlas_bottom: 219.500000, + atlas_right: 176.500000, + atlas_top: 179.500000, }, { ch: 'u', @@ -756,10 +756,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.025627, plane_right: 0.405434, plane_top: 0.521089, - atlas_left: 0.029566, - atlas_bottom: -0.025627, - atlas_right: 0.405434, - atlas_top: 0.521089, + atlas_left: 92.500000, + atlas_bottom: 253.500000, + atlas_right: 114.500000, + atlas_top: 221.500000, }, { ch: 'v', @@ -768,10 +768,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.423061, plane_top: 0.521089, - atlas_left: -0.004061, - atlas_bottom: -0.008542, - atlas_right: 0.423061, - atlas_top: 0.521089, + atlas_left: 144.500000, + atlas_bottom: 252.500000, + atlas_right: 169.500000, + atlas_top: 221.500000, }, { ch: 'w', @@ -780,10 +780,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.653613, plane_top: 0.521089, - atlas_left: 0.004387, - atlas_bottom: -0.008542, - atlas_right: 0.653613, - atlas_top: 0.521089, + atlas_left: 205.500000, + atlas_bottom: 210.500000, + atlas_right: 243.500000, + atlas_top: 179.500000, }, { ch: 'x', @@ -792,10 +792,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.411019, plane_top: 0.521089, - atlas_left: 0.000981, - atlas_bottom: -0.008542, - atlas_right: 0.411019, - atlas_top: 0.521089, + atlas_left: 205.500000, + atlas_bottom: 252.500000, + atlas_right: 229.500000, + atlas_top: 221.500000, }, { ch: 'y', @@ -804,10 +804,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.213561, plane_right: 0.424561, plane_top: 0.521089, - atlas_left: -0.002561, - atlas_bottom: -0.213561, - atlas_right: 0.424561, - atlas_top: 0.521089, + atlas_left: 96.500000, + atlas_bottom: 95.500000, + atlas_right: 121.500000, + atlas_top: 52.500000, }, { ch: 'z', @@ -816,10 +816,10 @@ static immutable FontAtlas FONT_ATLAS = { plane_bottom: -0.008542, plane_right: 0.377934, plane_top: 0.521089, - atlas_left: 0.002066, - atlas_bottom: -0.008542, - atlas_right: 0.377934, - atlas_top: 0.521089, + atlas_left: 229.500000, + atlas_bottom: 252.500000, + atlas_right: 251.500000, + atlas_top: 221.500000, }, ], }; diff --git a/src/gears/game.d b/src/gears/game.d index a73bb12..aa579dc 100644 --- a/src/gears/game.d +++ b/src/gears/game.d @@ -113,9 +113,9 @@ InitGame(PlatformWindow* window) int width, height, has_ch; auto img = stbi_load_from_memory(atlas.ptr, cast(int)atlas.length, &width, &height, &has_ch, 4); assert(width == FONT_ATLAS.width && height == FONT_ATLAS.height && has_ch == 1, "atlas height and width do not match"); - u8[] img_slice = img[0 .. width * height]; + u8[] img_slice = img[0 .. width * height * 4]; - CreateImageView(&g.rd, &g.font_tex, FONT_ATLAS.width, FONT_ATLAS.height, 1, img_slice); + CreateImageView(&g.rd, &g.font_tex, FONT_ATLAS.width, FONT_ATLAS.height, 4, img_slice); CreateImageView(&g.rd, &g.default_tex, 16, 16, 4, white_tex); WriteGUI(&g.rd, g.ui_desc_set, &g.font_tex); @@ -176,7 +176,7 @@ Cycle(Game* g) Reset(&g.frame_arena); DrawRect(g, 500.0, 500.0, 800.0, 800.0, Vec4(0.2, 0.3, 0.7, 1.0)); - DrawText(g, 200.0, 200.0, 32.0, "Test"); + DrawText(g, 200.0, 200.0, 32.0, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); BeginFrame(&g.rd); @@ -332,12 +332,18 @@ DrawText(Game* g, f32 x, f32 y, f32 px, string str) f32 w = px * (glyph.plane_right - glyph.plane_left); f32 h = px * (glyph.plane_bottom - glyph.plane_top); - f32 y_pos = px * glyph.plane_top; + f32 y_pos = px * glyph.plane_bottom; v.dst_start.x = x_pos; - v.dst_start.y = y + y_pos; + v.dst_start.y = y + h - y_pos; v.dst_end.x = x_pos + w; - v.dst_end.y = y + h; + v.dst_end.y = y - y_pos; + + v.src_start.x = glyph.atlas_left; + v.src_start.y = glyph.atlas_top; + v.src_end.x = glyph.atlas_right; + v.src_end.y = glyph.atlas_bottom; + v.col = Vec4(1.0, 1.0, 1.0, 1.0); x_pos += px * glyph.advance; @@ -366,9 +372,9 @@ DrawRect(Game* g, f32 p0_x, f32 p0_y, f32 p1_x, f32 p1_y, Vec4 col) { // Y reversed g.ui_vertex_buf[g.ui_count].dst_start.x = p0_x; - g.ui_vertex_buf[g.ui_count].dst_start.y = p1_y; + g.ui_vertex_buf[g.ui_count].dst_start.y = p0_y; g.ui_vertex_buf[g.ui_count].dst_end.x = p1_x; - g.ui_vertex_buf[g.ui_count].dst_end.y = p0_y; + g.ui_vertex_buf[g.ui_count].dst_end.y = p1_y; g.ui_vertex_buf[g.ui_count].col = col; AddUIIndices(g); diff --git a/src/gears/vulkan.d b/src/gears/vulkan.d index 3697c92..4552310 100644 --- a/src/gears/vulkan.d +++ b/src/gears/vulkan.d @@ -1638,6 +1638,13 @@ InitFramebufferAndRenderPass(Vulkan* vk) VkResult result = vkCreateRenderPass(vk.device, &pass_info, null, &vk.render_pass); VkCheckA("vkCreateRenderPass failure", result); + CreateFramebuffer(vk); +} + +void +CreateFramebuffer(Vulkan* vk) +{ + VkFramebufferCreateInfo framebuffer_info = { sType: VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, renderPass: vk.render_pass, @@ -1648,7 +1655,7 @@ InitFramebufferAndRenderPass(Vulkan* vk) layers: 1, }; - result = vkCreateFramebuffer(vk.device, &framebuffer_info, null, &vk.framebuffer); + VkResult result = vkCreateFramebuffer(vk.device, &framebuffer_info, null, &vk.framebuffer); VkCheckA("vkCreateFramebuffer failure", result); } @@ -1678,7 +1685,7 @@ CreateGraphicsPipeline(Vulkan* vk, GfxPipelineInfo* build_info) cullMode: VK_CULL_MODE_BACK_BIT, polygonMode: VK_POLYGON_MODE_FILL, lineWidth: 1.0, - frontFace: VK_FRONT_FACE_COUNTER_CLOCKWISE, + frontFace: VK_FRONT_FACE_CLOCKWISE, }; VkPipelineMultisampleStateCreateInfo multisample_info = { @@ -2547,10 +2554,12 @@ RecreateSwapchain(Vulkan* vk) Destroy(vk.swapchain, vk.present_images, vk.device); Destroy(vk, &vk.draw_image); Destroy(vk, &vk.depth_image); + vkDestroyFramebuffer(vk.device, vk.framebuffer, null); CreateSwapchain(vk); CreateDrawImages(vk); WriteDrawImageDesc(vk); + CreateFramebuffer(vk); } bool diff --git a/src/packer/packer.d b/src/packer/packer.d index 5c3ea92..9e950df 100644 --- a/src/packer/packer.d +++ b/src/packer/packer.d @@ -91,10 +91,10 @@ CodegenFontLookup() glyph.plane_right = val["planeBounds"]["right"].floating; glyph.plane_top = val["planeBounds"]["top"].floating; - glyph.atlas_left = val["planeBounds"]["left"].floating; - glyph.atlas_bottom = val["planeBounds"]["bottom"].floating; - glyph.atlas_right = val["planeBounds"]["right"].floating; - glyph.atlas_top = val["planeBounds"]["top"].floating; + glyph.atlas_left = val["atlasBounds"]["left"].floating; + glyph.atlas_bottom = val["atlasBounds"]["bottom"].floating; + glyph.atlas_right = val["atlasBounds"]["right"].floating; + glyph.atlas_top = val["atlasBounds"]["top"].floating; } atlas.glyphs ~= glyph; @@ -133,9 +133,9 @@ CodegenFontLookup() f.writefln("\t\t\tplane_top: %f,", g.plane_top); f.writefln("\t\t\tatlas_left: %f,", g.atlas_left); - f.writefln("\t\t\tatlas_bottom: %f,", g.atlas_bottom); + f.writefln("\t\t\tatlas_bottom: %f,", atlas.height - g.atlas_bottom); f.writefln("\t\t\tatlas_right: %f,", g.atlas_right); - f.writefln("\t\t\tatlas_top: %f,", g.atlas_top); + f.writefln("\t\t\tatlas_top: %f,", atlas.height - g.atlas_top); } f.writeln("\t\t},"); diff --git a/src/shaders/gui.frag.glsl b/src/shaders/gui.frag.glsl index 335fc23..93b5149 100644 --- a/src/shaders/gui.frag.glsl +++ b/src/shaders/gui.frag.glsl @@ -15,5 +15,5 @@ layout (location = 0) out vec4 FragColor; void main() { vec4 tex_color = texture(sampler2D(SpriteAtlas, SamplerNearest), FragData.uv); - FragColor = FragData.color;// * tex_color; + FragColor = FragData.color * tex_color; } diff --git a/src/shaders/gui.vert.glsl b/src/shaders/gui.vert.glsl index 062a7b3..75d4a61 100644 --- a/src/shaders/gui.vert.glsl +++ b/src/shaders/gui.vert.glsl @@ -40,12 +40,16 @@ void main() vec2 src_center = (in_src_end + in_src_start) / 2; vec2 src_pos = (Vertices[gl_VertexIndex] * src_half_size + src_center); - FragData.color = in_col; - FragData.uv = vec2( - in_src_start.x / tex_size.x, - in_src_start.y / tex_size.y + vec2 uvs[4] = vec2[4]( + vec2(in_src_start.x, in_src_end.y), + vec2(in_src_start.x, in_src_start.y), + vec2(in_src_end.x, in_src_end.y), + vec2(in_src_end.x, in_src_start.y) ); + FragData.color = in_col; + FragData.uv = uvs[gl_VertexIndex] / tex_size; + gl_Position = vec4(2 * dst_pos.x / PC.res.x - 1, 2 * dst_pos.y / PC.res.y - 1, 0,