bevy/crates/bevy_text/src
ickshonpe 166686e0f2
Rename TextAlignment to JustifyText. (#10854)
# Objective

The name `TextAlignment` is really deceptive and almost every new user
gets confused about the differences between aligning text with
`TextAlignment`, aligning text with `Style` and aligning text with
anchor (when using `Text2d`).

## Solution

* Rename `TextAlignment` to `JustifyText`. The associated helper methods
are also renamed.
* Improve the doc comments for text explaining explicitly how the
`JustifyText` component affects the arrangement of text.
* Add some extra cases to the `text_debug` example that demonstate the
differences between alignment using `JustifyText` and alignment using
`Style`.
<img width="757" alt="text_debug_2"
src="https://github.com/bevyengine/bevy/assets/27962798/9d53e647-93f9-4bc7-8a20-0d9f783304d2">

---

## Changelog
* `TextAlignment` has been renamed to `JustifyText`
* `TextBundle::with_text_alignment` has been renamed to
`TextBundle::with_text_justify`
* `Text::with_alignment` has been renamed to `Text::with_justify`
* The `text_alignment` field of `TextMeasureInfo` has been renamed to
`justification`

## Migration Guide
* `TextAlignment` has been renamed to `JustifyText`
* `TextBundle::with_text_alignment` has been renamed to
`TextBundle::with_text_justify`
* `Text::with_alignment` has been renamed to `Text::with_justify`
* The `text_alignment` field of `TextMeasureInfo` has been renamed to
`justification`
2023-12-05 03:00:41 +00:00
..
error.rs Remove TextError::ExceedMaxTextAtlases(usize) variant (#6796) 2022-12-05 23:23:16 +00:00
FiraMono-subset.ttf add a default font (#8445) 2023-04-21 22:30:18 +00:00
font.rs Improved Text Rendering (#10537) 2023-11-14 13:44:25 +00:00
font_atlas.rs Improved Text Rendering (#10537) 2023-11-14 13:44:25 +00:00
font_atlas_set.rs Replace all usages of texture_descritor.size.* with the helper methods (#10227) 2023-10-23 20:49:02 +00:00
font_loader.rs Removed anyhow (#10003) 2023-10-06 07:20:13 +00:00
glyph_brush.rs Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00
lib.rs Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00
pipeline.rs Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00
text.rs Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00
text2d.rs Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00