Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

FC0a: ui/text/font_query passes (SSIM 0.9933, worst tile 19), with TextFont's width: font_width (a share of the normal width, FontWidth's constants) is CSS's font-stretch, which Blitz's parley turns into the variable face's wdth as bevy_text's does. A bevy_ui Text now takes no synthetic italic skew, as bevy_text draws an Italic or Oblique run of a face with no slant upright (MonaSans has none); page text keeps Chrome's. The other text ports keep their scores. Mutants: font_width ignored fails the bar (tile 58), the skew back fails it (tile 33). Test: conformance/ui.test.tsx's font_width.

shinyobjectz342bcfc3c020
diff --git a/bench/bevy-parity/examples.list b/bench/bevy-parity/examples.list
index b8ffd9d0..3f3291f5 100644
--- a/bench/bevy-parity/examples.list
+++ b/bench/bevy-parity/examples.list
@@ -87,3 +87,4 @@ ui/scroll_and_overflow/scroll
ui/scroll_and_overflow/drag_to_scroll
ui/scroll_and_overflow/scrollbars
ui/scroll_and_overflow/overflow_debug
+ui/text/font_query
diff --git a/bench/bevy-parity/runs.tsv b/bench/bevy-parity/runs.tsv
index 91eb409e..c8266561 100644
--- a/bench/bevy-parity/runs.tsv
+++ b/bench/bevy-parity/runs.tsv
@@ -86,3 +86,4 @@ ui/scroll_and_overflow/scroll - 10
ui/scroll_and_overflow/drag_to_scroll - 10
ui/scroll_and_overflow/scrollbars - 10
ui/scroll_and_overflow/overflow_debug - 10
+ui/text/font_query - 10
diff --git a/docs/bevy-parity.md b/docs/bevy-parity.md
index c488d049..44a10644 100644
--- a/docs/bevy-parity.md
+++ b/docs/bevy-parity.md
@@ -4,7 +4,7 @@ Bevy v0.20.0's examples against their raea TSX ports (docs/control.feature FC0a)
don't edit. An example passes when every probed frame passes pixels (SSIM 0.98 and no 32 px tile off by more than 24 of 255) and cost (batch keys and
frame time at most 1.25x the example's). Wall time is one machine's, measured in the same run.
-Examples: **438**, ported **87**, passing **83**, excluded **16** (docs/bevy-parity/excluded.tsv), left **339**.
+Examples: **438**, ported **88**, passing **84**, excluded **16** (docs/bevy-parity/excluded.tsv), left **338**.
raea's frame ms is its update's plus the time React takes to step a frame for its 3D (step), which the example
doesn't pay.
@@ -99,14 +99,8 @@ doesn't pay.
| ui/layout/fixed_node | 5 | 1.000000 | 0 | 0 / 0 | 444 / 492 | 5 / 7 | 1 / 1 | 59.165 / 2.544 = 2.294 + 0.250 | yes | |
| ui/images/image_node | 10 | 0.999965 | 0 | 0 / 0 | 442 / 492 | 5 / 7 | 1 / 1 | 2.492 / 2.281 = 2.117 + 0.164 | yes | |
| ui/images/image_node | 5 | 0.999965 | 0 | 0 / 0 | 442 / 492 | 5 / 7 | 1 / 1 | 64.462 / 2.143 = 1.943 + 0.200 | yes | |
-| ui/text/font_weights | 10 | 0.991774 | 17 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 2.141 / 1.798 = 1.616 + 0.182 | yes | |
-| ui/text/font_weights | 5 | 0.991774 | 17 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 63.211 / 2.529 = 2.362 + 0.167 | yes | |
-| ui/text/font_variations | 10 | 0.993984 | 20 | 0 / 0 | 452 / 492 | 5 / 7 | 1 / 1 | 2.578 / 2.447 = 2.311 + 0.136 | yes | |
-| ui/text/font_variations | 5 | 0.993984 | 20 | 0 / 0 | 452 / 492 | 5 / 7 | 1 / 1 | 67.396 / 2.577 = 2.344 + 0.233 | yes | |
| ui/text/text_background_colors | 10 | 0.998841 | 7 | 0 / 0 | 505 / 492 | 5 / 7 | 1 / 1 | 1.94 / 1.302 = 1.129 + 0.173 | yes | |
| ui/text/text_background_colors | 5 | 0.998841 | 7 | 0 / 0 | 505 / 492 | 5 / 7 | 1 / 1 | 64.804 / 2.805 = 2.572 + 0.233 | yes | |
-| ui/text/strikethrough_and_underline | 10 | 0.990823 | 15 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 2.538 / 1.956 = 1.62 + 0.336 | yes | |
-| ui/text/strikethrough_and_underline | 5 | 0.990823 | 15 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 69.704 / 4.146 = 3.913 + 0.233 | yes | |
| ui/scroll_and_overflow/overflow | 10 | 0.998763 | 4 | 0 / 0 | 461 / 492 | 5 / 7 | 1 / 1 | 2.902 / 1.514 = 1.278 + 0.236 | yes | |
| ui/scroll_and_overflow/overflow | 5 | 0.998763 | 4 | 0 / 0 | 461 / 492 | 5 / 7 | 1 / 1 | 65.578 / 3.526 = 3.193 + 0.333 | yes | |
| ui/images/ui_texture_atlas | 10 | 0.999776 | 6 | 0 / 0 | 445 / 492 | 5 / 7 | 1 / 1 | 2.056 / 1.477 = 1.213 + 0.264 | yes | |
@@ -123,7 +117,6 @@ doesn't pay.
| ui/layout/z_index | 10 | 1.000000 | 0 | 0 / 0 | 447 / 492 | 5 / 7 | 1 / 1 | 32.169 / 1.386 = 1.231 + 0.155 | yes | |
| ui/styling/stacked_gradients | 10 | 0.994550 | 1 | 0 / 0 | 442 / 492 | 5 / 7 | 1 / 1 | 46.978 / 1.428 = 1.255 + 0.173 | yes | |
| ui/styling/gradients | 10 | 0.988141 | 14 | 0 / 0 | 553 / 492 | 5 / 7 | 1 / 1 | 40.253 / 4.425 = 2.089 + 2.336 | yes | |
-| ui/text/generic_font_families | 10 | 0.990063 | 19 | 0 / 0 | 457 / 492 | 5 / 7 | 1 / 1 | 41.156 / 2.365 = 2.083 + 0.282 | yes | |
| ui/layout/ghost_nodes | 10 | 0.998544 | 9 | 0 / 0 | 455 / 492 | 5 / 7 | 1 / 1 | 35.333 / 1.312 = 1.13 + 0.182 | yes | |
| ui/relative_cursor_position | 10 | 0.999907 | 2 | 0 / 0 | 443 / 492 | 5 / 7 | 1 / 1 | 52.279 / 3.978 = 3.723 + 0.255 | yes | |
| ui/ui_target_camera | 10 | 0.998769 | 7 | 0 / 0 | 452 / 492 | 5 / 7 | 1 / 1 | 39.413 / 1.71 = 1.71 + 0 | yes | |
@@ -131,7 +124,6 @@ doesn't pay.
| ui/layout/anchor_layout | 10 | 0.997421 | 9 | 0 / 0 | 468 / 492 | 5 / 7 | 1 / 1 | 33.145 / 1.417 = 1.417 + 0 | yes | |
| ui/layout/size_constraints | 10 | 0.991466 | 19 | 0 / 0 | 608 / 492 | 5 / 7 | 1 / 1 | 31.358 / 0.993 = 0.993 + 0 | yes | |
| ui/scroll_and_overflow/overflow_transform | 10 | 0.995397 | 12 | 0 / 0 | 447 / 492 | 5 / 7 | 1 / 1 | 41.134 / 1.724 = 1.724 + 0 | yes | |
-| ui/text/text | 10 | 0.990913 | 8 | 0 / 0 | 459 / 492 | 5 / 7 | 1 / 1 | 34.947 / 1.446 = 1.446 + 0 | yes | |
| ui/text/text_debug | 10 | 0.984022 | 18 | 0 / 0 | 458 / 492 | 5 / 7 | 1 / 1 | 35.188 / 1.093 = 1.093 + 0 | yes | |
| ui/ui_transform | 10 | 0.999095 | 6 | 0 / 0 | 463 / 492 | 5 / 7 | 1 / 1 | 36.534 / 1.372 = 1.372 + 0 | yes | |
| ui/scroll_and_overflow/scroll | 10 | 0.997196 | 14 | 0 / 0 | 1988 / 492 | 5 / 7 | 1 / 1 | 35.528 / 1.129 = 1.129 + 0 | yes | |
@@ -143,6 +135,15 @@ doesn't pay.
| ui/images/ui_texture_atlas_slice | 10 | 0.990813 | 16 | 0 / 0 | 447 / 492 | 5 / 7 | 1 / 1 | 36.454 / 1.397 = 1.397 + 0 | yes | |
| ui/scroll_and_overflow/scrollbars | 10 | 0.994524 | 21 | 0 / 0 | 462 / 492 | 5 / 7 | 1 / 1 | 43.63 / 1.382 = 1.382 + 0 | yes | |
| ui/scroll_and_overflow/overflow_debug | 10 | 0.996511 | 10 | 0 / 0 | 463 / 492 | 5 / 7 | 1 / 1 | 38.277 / 1.215 = 1.215 + 0 | yes | |
+| ui/text/font_weights | 10 | 0.991774 | 17 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 2.498 / 1.731 = 1.731 + 0 | yes | |
+| ui/text/font_weights | 5 | 0.991774 | 17 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 72.229 / 2.06 = 2.06 + 0 | yes | |
+| ui/text/strikethrough_and_underline | 10 | 0.990823 | 15 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 2.3 / 2.548 = 2.548 + 0 | yes | |
+| ui/text/strikethrough_and_underline | 5 | 0.990823 | 15 | 0 / 0 | 454 / 492 | 5 / 7 | 1 / 1 | 72.797 / 3.018 = 3.018 + 0 | yes | |
+| ui/text/text | 10 | 0.990913 | 8 | 0 / 0 | 459 / 492 | 5 / 7 | 1 / 1 | 37.635 / 1.586 = 1.586 + 0 | yes | |
+| ui/text/generic_font_families | 10 | 0.990063 | 19 | 0 / 0 | 457 / 492 | 5 / 7 | 1 / 1 | 40.255 / 1.221 = 1.221 + 0 | yes | |
+| ui/text/font_variations | 10 | 0.993984 | 20 | 0 / 0 | 452 / 492 | 5 / 7 | 1 / 1 | 2.066 / 1.468 = 1.468 + 0 | yes | |
+| ui/text/font_variations | 5 | 0.993984 | 20 | 0 / 0 | 452 / 492 | 5 / 7 | 1 / 1 | 73.631 / 2.268 = 2.268 + 0 | yes | |
+| ui/text/font_query | 10 | 0.993297 | 19 | 0 / 0 | 467 / 492 | 5 / 7 | 1 / 1 | 53.646 / 2.847 = 2.847 + 0 | yes | |
## Excluded
diff --git a/docs/bevy-parity/results.jsonl b/docs/bevy-parity/results.jsonl
index 9a1bcf81..64e8ec6e 100644
--- a/docs/bevy-parity/results.jsonl
+++ b/docs/bevy-parity/results.jsonl
@@ -86,14 +86,8 @@
{"example":"ui/layout/fixed_node","frame":5,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":444,"extents":[],"frame":5,"frame_ms":59.165,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.294,"step_ms":0.250,"cost_ms":2.544},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/images/image_node","frame":10,"ssim":0.999965,"tile":0,"bevy":{"batch_keys":0,"entities":442,"extents":[],"frame":10,"frame_ms":2.492,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.117,"step_ms":0.164,"cost_ms":2.281},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/images/image_node","frame":5,"ssim":0.999965,"tile":0,"bevy":{"batch_keys":0,"entities":442,"extents":[],"frame":5,"frame_ms":64.462,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.943,"step_ms":0.200,"cost_ms":2.143},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/font_weights","frame":10,"ssim":0.991774,"tile":17,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":10,"frame_ms":2.141,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.616,"step_ms":0.182,"cost_ms":1.798},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/font_weights","frame":5,"ssim":0.991774,"tile":17,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":5,"frame_ms":63.211,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.362,"step_ms":0.167,"cost_ms":2.529},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/font_variations","frame":10,"ssim":0.993984,"tile":20,"bevy":{"batch_keys":0,"entities":452,"extents":[],"frame":10,"frame_ms":2.578,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.311,"step_ms":0.136,"cost_ms":2.447},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/font_variations","frame":5,"ssim":0.993984,"tile":20,"bevy":{"batch_keys":0,"entities":452,"extents":[],"frame":5,"frame_ms":67.396,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.344,"step_ms":0.233,"cost_ms":2.577},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/text/text_background_colors","frame":10,"ssim":0.998841,"tile":7,"bevy":{"batch_keys":0,"entities":505,"extents":[],"frame":10,"frame_ms":1.94,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.129,"step_ms":0.173,"cost_ms":1.302},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/text/text_background_colors","frame":5,"ssim":0.998841,"tile":7,"bevy":{"batch_keys":0,"entities":505,"extents":[],"frame":5,"frame_ms":64.804,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.572,"step_ms":0.233,"cost_ms":2.805},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/strikethrough_and_underline","frame":10,"ssim":0.990823,"tile":15,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":10,"frame_ms":2.538,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.62,"step_ms":0.336,"cost_ms":1.956},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/strikethrough_and_underline","frame":5,"ssim":0.990823,"tile":15,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":5,"frame_ms":69.704,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":3.913,"step_ms":0.233,"cost_ms":4.146},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/scroll_and_overflow/overflow","frame":10,"ssim":0.998763,"tile":4,"bevy":{"batch_keys":0,"entities":461,"extents":[],"frame":10,"frame_ms":2.902,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.278,"step_ms":0.236,"cost_ms":1.514},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/scroll_and_overflow/overflow","frame":5,"ssim":0.998763,"tile":4,"bevy":{"batch_keys":0,"entities":461,"extents":[],"frame":5,"frame_ms":65.578,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":3.193,"step_ms":0.333,"cost_ms":3.526},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/images/ui_texture_atlas","frame":10,"ssim":0.999776,"tile":6,"bevy":{"batch_keys":0,"entities":445,"extents":[],"frame":10,"frame_ms":2.056,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.213,"step_ms":0.264,"cost_ms":1.477},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
@@ -110,7 +104,6 @@
{"example":"ui/layout/z_index","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":[],"frame":10,"frame_ms":32.169,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.231,"step_ms":0.155,"cost_ms":1.386},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/styling/stacked_gradients","frame":10,"ssim":0.994550,"tile":1,"bevy":{"batch_keys":0,"entities":442,"extents":[],"frame":10,"frame_ms":46.978,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.255,"step_ms":0.173,"cost_ms":1.428},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/styling/gradients","frame":10,"ssim":0.988141,"tile":14,"bevy":{"batch_keys":0,"entities":553,"extents":[],"frame":10,"frame_ms":40.253,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.089,"step_ms":2.336,"cost_ms":4.425},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/generic_font_families","frame":10,"ssim":0.990063,"tile":19,"bevy":{"batch_keys":0,"entities":457,"extents":[],"frame":10,"frame_ms":41.156,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.083,"step_ms":0.282,"cost_ms":2.365},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/layout/ghost_nodes","frame":10,"ssim":0.998544,"tile":9,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":10,"frame_ms":35.333,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.13,"step_ms":0.182,"cost_ms":1.312},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/relative_cursor_position","frame":10,"ssim":0.999907,"tile":2,"bevy":{"batch_keys":0,"entities":443,"extents":[],"frame":10,"frame_ms":52.279,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":3.723,"step_ms":0.255,"cost_ms":3.978},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/ui_target_camera","frame":10,"ssim":0.998769,"tile":7,"bevy":{"batch_keys":0,"entities":452,"extents":[],"frame":10,"frame_ms":39.413,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.71,"step_ms":null,"cost_ms":1.71},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
@@ -118,7 +111,6 @@
{"example":"ui/layout/anchor_layout","frame":10,"ssim":0.997421,"tile":9,"bevy":{"batch_keys":0,"entities":468,"extents":[],"frame":10,"frame_ms":33.145,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.417,"step_ms":null,"cost_ms":1.417},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/layout/size_constraints","frame":10,"ssim":0.991466,"tile":19,"bevy":{"batch_keys":0,"entities":608,"extents":[],"frame":10,"frame_ms":31.358,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":0.993,"step_ms":null,"cost_ms":0.993},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/scroll_and_overflow/overflow_transform","frame":10,"ssim":0.995397,"tile":12,"bevy":{"batch_keys":0,"entities":447,"extents":[],"frame":10,"frame_ms":41.134,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.724,"step_ms":null,"cost_ms":1.724},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"ui/text/text","frame":10,"ssim":0.990913,"tile":8,"bevy":{"batch_keys":0,"entities":459,"extents":[],"frame":10,"frame_ms":34.947,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.446,"step_ms":null,"cost_ms":1.446},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/text/text_debug","frame":10,"ssim":0.984022,"tile":18,"bevy":{"batch_keys":0,"entities":458,"extents":[],"frame":10,"frame_ms":35.188,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.093,"step_ms":null,"cost_ms":1.093},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/ui_transform","frame":10,"ssim":0.999095,"tile":6,"bevy":{"batch_keys":0,"entities":463,"extents":[],"frame":10,"frame_ms":36.534,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.372,"step_ms":null,"cost_ms":1.372},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/scroll_and_overflow/scroll","frame":10,"ssim":0.997196,"tile":14,"bevy":{"batch_keys":0,"entities":1988,"extents":[],"frame":10,"frame_ms":35.528,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.129,"step_ms":null,"cost_ms":1.129},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
@@ -130,3 +122,12 @@
{"example":"ui/images/ui_texture_atlas_slice","frame":10,"ssim":0.990813,"tile":16,"bevy":{"batch_keys":0,"entities":447,"extents":[],"frame":10,"frame_ms":36.454,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.397,"step_ms":null,"cost_ms":1.397},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/scroll_and_overflow/scrollbars","frame":10,"ssim":0.994524,"tile":21,"bevy":{"batch_keys":0,"entities":462,"extents":[],"frame":10,"frame_ms":43.63,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.382,"step_ms":null,"cost_ms":1.382},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/scroll_and_overflow/overflow_debug","frame":10,"ssim":0.996511,"tile":10,"bevy":{"batch_keys":0,"entities":463,"extents":[],"frame":10,"frame_ms":38.277,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.215,"step_ms":null,"cost_ms":1.215},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/font_weights","frame":10,"ssim":0.991774,"tile":17,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":10,"frame_ms":2.498,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.731,"step_ms":null,"cost_ms":1.731},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/font_weights","frame":5,"ssim":0.991774,"tile":17,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":5,"frame_ms":72.229,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.06,"step_ms":null,"cost_ms":2.06},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/strikethrough_and_underline","frame":10,"ssim":0.990823,"tile":15,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":10,"frame_ms":2.3,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.548,"step_ms":null,"cost_ms":2.548},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/strikethrough_and_underline","frame":5,"ssim":0.990823,"tile":15,"bevy":{"batch_keys":0,"entities":454,"extents":[],"frame":5,"frame_ms":72.797,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":3.018,"step_ms":null,"cost_ms":3.018},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/text","frame":10,"ssim":0.990913,"tile":8,"bevy":{"batch_keys":0,"entities":459,"extents":[],"frame":10,"frame_ms":37.635,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.586,"step_ms":null,"cost_ms":1.586},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/generic_font_families","frame":10,"ssim":0.990063,"tile":19,"bevy":{"batch_keys":0,"entities":457,"extents":[],"frame":10,"frame_ms":40.255,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.221,"step_ms":null,"cost_ms":1.221},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/font_variations","frame":10,"ssim":0.993984,"tile":20,"bevy":{"batch_keys":0,"entities":452,"extents":[],"frame":10,"frame_ms":2.066,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.468,"step_ms":null,"cost_ms":1.468},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/font_variations","frame":5,"ssim":0.993984,"tile":20,"bevy":{"batch_keys":0,"entities":452,"extents":[],"frame":5,"frame_ms":73.631,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":12,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.268,"step_ms":null,"cost_ms":2.268},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"ui/text/font_query","frame":10,"ssim":0.993297,"tile":19,"bevy":{"batch_keys":0,"entities":467,"extents":[],"frame":10,"frame_ms":53.646,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":492,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.847,"step_ms":null,"cost_ms":2.847},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
diff --git a/sdk/raea/bench/bevy-parity/ui/text/font_query.tsx b/sdk/raea/bench/bevy-parity/ui/text/font_query.tsx
new file mode 100644
index 00000000..4321155c
--- /dev/null
+++ b/sdk/raea/bench/bevy-parity/ui/text/font_query.tsx
@@ -0,0 +1,34 @@
+// Bevy v0.20.0 examples/ui/text/font_query.rs in raea's TSX: centred in the window, a column (16 px padding and gap)
+// of "Font Weights, Widths & Styles" (32 px, underlined) over a row of three columns 32 px apart (8 px padding and
+// gap), every line in MonaSans-VariableFont.ttf at the default 20 px: the nine weights 100 to 900, the nine FontWidths
+// from ULTRA_CONDENSED to ULTRA_EXPANDED, and the styles Normal, Oblique and Italic. Bevy's Camera2d over the default
+// clear colour is the layered <Canvas3D>. In Bevy's default 1280 x 720 window.
+import type { ReactNode } from "react";
+import { AbsoluteFill, Composition, registerRoot, staticFile } from "raea";
+import { Canvas3D } from "raea/3d";
+import { FontWidth, Node, Text, UiRect, px } from "raea/ui";
+
+const FONT = staticFile("fonts/MonaSans-VariableFont.ttf");
+const WEIGHTS: [number, string][] = [[100, "Thin"], [200, "Extra Light"], [300, "Light"], [400, "Normal"], [500, "Medium"], [600, "Semibold"], [700, "Bold"], [800, "Extra Bold"], [900, "Black"]];
+const WIDTHS = ["ULTRA_CONDENSED", "EXTRA_CONDENSED", "CONDENSED", "SEMI_CONDENSED", "NORMAL", "SEMI_EXPANDED", "EXPANDED", "EXTRA_EXPANDED", "ULTRA_EXPANDED"] as const;
+const STYLES = ["Normal", "Oblique", "Italic"] as const;
+
+const Column = ({ children }: { children: ReactNode }) => <Node flex_direction="Column" padding={UiRect.all(px(8))} row_gap={px(8)}>{children}</Node>;
+
+function Shot() {
+ return (
+ <AbsoluteFill>
+ <Canvas3D layered clearColor="rgb(43, 44, 47)" />
+ <Node flex_direction="Column" align_self="Center" justify_self="Center" align_items="Center" padding={UiRect.all(px(16))} row_gap={px(16)}>
+ <Text font={FONT} font_size={{ Px: 32 }} underline>{"Font Weights, Widths & Styles"}</Text>
+ <Node flex_direction="Row" column_gap={px(32)}>
+ <Column>{WEIGHTS.map(([w, name]) => <Text key={w} font={FONT} weight={w}>{`Weight ${w} (${name})`}</Text>)}</Column>
+ <Column>{WIDTHS.map((k) => <Text key={k} font={FONT} font_width={FontWidth[k]}>{`FontWidth::${k}`}</Text>)}</Column>
+ <Column>{STYLES.map((s) => <Text key={s} font={FONT} style={s}>{`FontStyle::${s}`}</Text>)}</Column>
+ </Node>
+ </Node>
+ </AbsoluteFill>
+ );
+}
+
+registerRoot(() => <Composition id="main" component={Shot} durationInFrames={11} fps={60} width={1280} height={720} />);
diff --git a/sdk/raea/conformance/ui.test.tsx b/sdk/raea/conformance/ui.test.tsx
index e71f7eb6..3aec5767 100644
--- a/sdk/raea/conformance/ui.test.tsx
+++ b/sdk/raea/conformance/ui.test.tsx
@@ -1,7 +1,7 @@
// docs/control.feature FC0a: bevy_ui's Node, Text and TextSpan on the page, with Bevy's defaults, values and blend
// (ui/styling/transparency_ui, ui/layout/fixed_node).
import { describe, expect, test } from "bun:test";
-import { AngularColorStop, FontFeatureTag, GhostNode, Viewport, UiTargetCamera, UiRect as GradRect, FontSource, GridPlacement, GridTrack, RepeatedGridTrack, ColorStop, ConicGradient, LinearGradient, RadialGradient, UiPosition, BorderRadius, CornerRadius, FontVariationTag, ImageNode, InlineImage, ImagePlugin, Node, TextureAtlasLayout, Overflow, OverflowClipMargin, Text, TextShadow, Text2d, UiScale, TextSpan, UiRect, auto, percent, px, vw } from "raea/ui";
+import { AngularColorStop, FontFeatureTag, FontWidth, GhostNode, Viewport, UiTargetCamera, UiRect as GradRect, FontSource, GridPlacement, GridTrack, RepeatedGridTrack, ColorStop, ConicGradient, LinearGradient, RadialGradient, UiPosition, BorderRadius, CornerRadius, FontVariationTag, ImageNode, InlineImage, ImagePlugin, Node, TextureAtlasLayout, Overflow, OverflowClipMargin, Text, TextShadow, Text2d, UiScale, TextSpan, UiRect, auto, percent, px, vw } from "raea/ui";
import { LinearRgba, Srgba } from "raea/color";
import { Canvas3D } from "raea/3d";
import { renderFrame } from "../src/test";
@@ -129,6 +129,12 @@ describe("ImageNode, Underline and Strikethrough", () => {
expect(() => html(<Text font_features={{ sc: 1 }}>a</Text>)).toThrow(/four characters/);
expect(() => html(<Text font_features={{ smcp: 0.5 }}>a</Text>)).toThrow(/whole number/);
});
+ test("TextFont's width (font_width, FontWidth's shares) is CSS's font-stretch, on a Text or a TextSpan", () => {
+ expect(html(<Text font_width={FontWidth.CONDENSED}>a</Text>)).toContain("font-stretch:75%");
+ expect(html(<Text>a<TextSpan font_width={FontWidth.ULTRA_EXPANDED}>b</TextSpan></Text>)).toMatch(/<span style="[^"]*font-stretch:200%[^"]*">b<\/span>/);
+ expect(html(<Text>a</Text>)).not.toContain("font-stretch");
+ expect(() => html(<Text font_width={0}>a</Text>)).toThrow(/font_width is above 0/);
+ });
test("a TextSpan of size 0 or less is left out, as bevy_text leaves it, and its Text's other runs drawn", () => {
const out = html(<Text>a<TextSpan font_size={{ Px: 0 }}>zero</TextSpan><TextSpan font_size={-42}>negative</TextSpan><TextSpan>b</TextSpan></Text>);
expect(out).not.toContain("zero");
diff --git a/sdk/raea/src/ui.ts b/sdk/raea/src/ui.ts
index 96ad2300..06b19a0c 100644
--- a/sdk/raea/src/ui.ts
+++ b/sdk/raea/src/ui.ts
@@ -10,6 +10,6 @@ export { Node, GhostNode, Text, TextSpan, TextShadow, Text2d, UiScale, Viewport,
export { LinearGradient, RadialGradient, ConicGradient, ColorStop, AngularColorStop, UiPosition, type Gradient, type RadialGradientShape, type InterpolationColorSpace } from "@raea/render/bevy3d";
export { GridTrack, RepeatedGridTrack, GridPlacement, type GridTrackRepetition, type GridAutoFlow, type MinTrackSizingFunction, type MaxTrackSizingFunction, FontSource, type GenericFontFamily } from "@raea/render/bevy3d";
export { Rot2, Val2, UiTransform, BoxShadow, type ShadowStyle } from "@raea/render/bevy3d";
-export { FontFeatureTag } from "@raea/render/bevy3d";
+export { FontFeatureTag, FontWidth } from "@raea/render/bevy3d";
export type { IgnoreScroll } from "@raea/render/bevy3d";
export { Scrollbar, ScrollbarThumb, type ScrollbarProps, type ScrollbarThumbProps, type ControlOrientation } from "@raea/render/bevy3d";
diff --git a/sdk/render/src/bevy3d.tsx b/sdk/render/src/bevy3d.tsx
index da21684e..28fb81a2 100644
--- a/sdk/render/src/bevy3d.tsx
+++ b/sdk/render/src/bevy3d.tsx
@@ -34,7 +34,7 @@ export { px, percent, vw, vh, vmin, vmax, auto, UiRect, BorderRadius, CornerRadi
export { LinearGradient, RadialGradient, ConicGradient, ColorStop, AngularColorStop, UiPosition, type Gradient, type RadialGradientShape, type InterpolationColorSpace } from "./bevy3d/ui-gradient";
export { GridTrack, RepeatedGridTrack, GridPlacement, type GridTrackRepetition, type GridAutoFlow, type MinTrackSizingFunction, type MaxTrackSizingFunction } from "./bevy3d/ui-grid";
export { Rot2, Val2, UiTransform, BoxShadow, type ShadowStyle } from "./bevy3d/ui-transform";
-export { FontFeatureTag } from "./bevy3d/ui-features";
+export { FontFeatureTag, FontWidth } from "./bevy3d/ui-features";
export type { IgnoreScroll } from "./bevy3d/ui-scroll";
export { Scrollbar, ScrollbarThumb, type ScrollbarProps, type ScrollbarThumbProps, type ControlOrientation } from "./bevy3d/ui-scrollbar";
export { FontSource, type GenericFontFamily } from "./bevy3d/ui-font";
diff --git a/sdk/render/src/bevy3d/ui-features.ts b/sdk/render/src/bevy3d/ui-features.ts
index c95e313f..8f4bb6f3 100644
--- a/sdk/render/src/bevy3d/ui-features.ts
+++ b/sdk/render/src/bevy3d/ui-features.ts
@@ -21,3 +21,10 @@ export function featuresCss(who: string, f: Record<string, number> | undefined):
});
return all.length ? all.join(", ") : undefined;
}
+
+/** bevy_text's FontWidth: a face's width as a share of its normal one (CSS's font-stretch), for a Text's font_width.
+ * @bevy bevy_text::FontWidth */
+export const FontWidth = {
+ ULTRA_CONDENSED: 0.5, EXTRA_CONDENSED: 0.625, CONDENSED: 0.75, SEMI_CONDENSED: 0.875, NORMAL: 1,
+ SEMI_EXPANDED: 1.125, EXPANDED: 1.25, EXTRA_EXPANDED: 1.5, ULTRA_EXPANDED: 2,
+} as const;
diff --git a/sdk/render/src/bevy3d/ui.tsx b/sdk/render/src/bevy3d/ui.tsx
index 06b8398d..8583557f 100644
--- a/sdk/render/src/bevy3d/ui.tsx
+++ b/sdk/render/src/bevy3d/ui.tsx
@@ -227,6 +227,8 @@ export interface TextStyleProps {
/** FontWeight: 100 to 900 (400 by default) */
weight?: number;
style?: "Normal" | "Italic" | "Oblique";
+ /** TextFont's width (FontWidth): a share of the face's normal width, FontWidth.CONDENSED 0.75 (1 by default) */
+ font_width?: number;
/** TextColor: white by default */
color?: Color;
/** LineHeight: { Px } or { RelativeToFont } (1.2 of the size by default) */
@@ -319,6 +321,8 @@ export function textCss(who: string, p: TextStyleProps, back?: Backdrop): { css:
else if ("RelativeToFont" in lh && Number.isFinite(lh.RelativeToFont)) lineHeight = lh.RelativeToFont;
else throw new TypeError(`${who}: line_height is { Px } or { RelativeToFont }, got ${JSON.stringify(lh)}`);
}
+ const fw = p.font_width;
+ if (fw !== undefined && !(Number.isFinite(fw) && fw > 0)) throw new RangeError(`${who}: font_width is above 0 (FontWidth.CONDENSED), got ${fw}`);
const css: CSSProperties = {
fontFamily: family,
fontSize: sizeCss(who, p.font_size),
@@ -330,6 +334,7 @@ export function textCss(who: string, p: TextStyleProps, back?: Backdrop): { css:
};
const variations = variationsCss(who, p.font_variations);
if (variations) css.fontVariationSettings = variations;
+ if (fw !== undefined) css.fontStretch = `${fw * 100}%`;
const features = featuresCss(who, p.font_features);
if (features) css.fontFeatureSettings = features;
const ls = p.letter_spacing;
@@ -350,10 +355,10 @@ const BREAK: Record<NonNullable<TextProps["linebreak"]>, CSSProperties> = {
/** Bevy's UI text: a Node whose content is its string and its <TextSpan> children, in its TextFont, TextColor,
* TextLayout and LineHeight (Bevy's defaults when left out). @bevy bevy_ui::widget::text::Text */
-export function Text({ children, font, font_size, weight, style, color, line_height, font_variations, font_features, letter_spacing, justify, linebreak, shadow, underline, strikethrough, underline_color, strikethrough_color, text_background_color, ...node }: TextProps) {
+export function Text({ children, font, font_size, weight, style, font_width, color, line_height, font_variations, font_features, letter_spacing, justify, linebreak, shadow, underline, strikethrough, underline_color, strikethrough_color, text_background_color, ...node }: TextProps) {
const ui = useContext(InUi);
const n = nodeCss("Text", node, ui?.back, useContext(UiScaleCx));
- const t = textCss("Text", { font, font_size, weight, style, color, line_height, font_variations, font_features, letter_spacing }, n.back);
+ const t = textCss("Text", { font, font_size, weight, style, font_width, color, line_height, font_variations, font_features, letter_spacing }, n.back);
if (justify !== undefined && !["Left", "Center", "Right", "Justified", "Start", "End"].includes(justify)) throw new TypeError(`Text: justify is Left, Center, Right, Justified, Start or End, got ${JSON.stringify(justify)}`);
if (linebreak !== undefined && !(linebreak in BREAK)) throw new TypeError(`Text: linebreak is WordBoundary, AnyCharacter, WordOrCharacter or NoWrap, got ${JSON.stringify(linebreak)}`);
const textAlign = { Left: "left", Center: "center", Right: "right", Justified: "justify", Start: "start", End: "end" }[justify ?? "Left"] as CSSProperties["textAlign"];
diff --git a/sdk/skills/raea/reference/sdk.md b/sdk/skills/raea/reference/sdk.md
index 3adeffe9..75e1c409 100644
--- a/sdk/skills/raea/reference/sdk.md
+++ b/sdk/skills/raea/reference/sdk.md
@@ -99,7 +99,7 @@ with a capital, hooks with `use`. A component's props are in its file.
## `raea/ui` (sdk/raea/src/ui.ts)
-`AbsoluteFill`, `AngularColorStop`, `BorderRadius`, `BoxShadow`, `ColorStop`, `ConicGradient`, `CornerRadius`, `FontFeatureTag`, `FontSource`, `FontVariationTag`, `GhostNode`, `GridPlacement`, `GridTrack`, `ImageNode`, `ImagePlugin`, `InlineImage`, `LinearGradient`, `Node`, `Overflow`, `OverflowClipMargin`, `RadialGradient`, `RepeatedGridTrack`, `Rot2`, `Scrollbar`, `ScrollbarThumb`, `Text`, `Text2d`, `TextShadow`, `TextSpan`, `TextureAtlasLayout`, `UiPosition`, `UiRect`, `UiScale`, `UiTargetCamera`, `UiTransform`, `Val2`, `Viewport`, `auto`, `percent`, `px`, `vh`, `vmax`, `vmin`, `vw`
+`AbsoluteFill`, `AngularColorStop`, `BorderRadius`, `BoxShadow`, `ColorStop`, `ConicGradient`, `CornerRadius`, `FontFeatureTag`, `FontSource`, `FontVariationTag`, `FontWidth`, `GhostNode`, `GridPlacement`, `GridTrack`, `ImageNode`, `ImagePlugin`, `InlineImage`, `LinearGradient`, `Node`, `Overflow`, `OverflowClipMargin`, `RadialGradient`, `RepeatedGridTrack`, `Rot2`, `Scrollbar`, `ScrollbarThumb`, `Text`, `Text2d`, `TextShadow`, `TextSpan`, `TextureAtlasLayout`, `UiPosition`, `UiRect`, `UiScale`, `UiTargetCamera`, `UiTransform`, `Val2`, `Viewport`, `auto`, `percent`, `px`, `vh`, `vmax`, `vmin`, `vw`
## `raea/video` (sdk/raea/src/video.ts)
diff --git a/vendor/blitz-paint/src/text.rs b/vendor/blitz-paint/src/text.rs
index 825e0525..8156bb6b 100644
--- a/vendor/blitz-paint/src/text.rs
+++ b/vendor/blitz-paint/src/text.rs
@@ -886,8 +886,11 @@ pub(crate) fn stroke_text<'a>(
let metrics = run.font_metrics();
let style = glyph_run.style();
let synthesis = run.synthesis();
+ // raea: a bevy_ui <Text> draws its glyphs upright, as bevy_text does: it takes no synthetic italic's
+ // skew from parley (an Italic or Oblique run of a face with no slant drawn as its upright face)
let glyph_xform = synthesis
.skew()
+ .filter(|_| !bevy)
.map(|angle| Affine::skew(angle.to_radians().tan() as f64, 0.0));
let css_font_size = font_size as f64 / scale;