bevy/crates
TotalKrill 5986d5d309
Cosmic text (#10193)
# Replace ab_glyph with the more capable cosmic-text

Fixes #7616.

Cosmic-text is a more mature text-rendering library that handles scripts
and ligatures better than ab_glyph, it can also handle system fonts
which can be implemented in bevy in the future

Rebase of https://github.com/bevyengine/bevy/pull/8808

## Changelog

Replaces text renderer ab_glyph with cosmic-text

The definition of the font size has changed with the migration to cosmic
text. The behavior is now consistent with other platforms (e.g. the
web), where the font size in pixels measures the height of the font (the
distance between the top of the highest ascender and the bottom of the
lowest descender). Font sizes in your app need to be rescaled to
approximately 1.2x smaller; for example, if you were using a font size
of 60.0, you should now use a font size of 50.0.

## Migration guide

- `Text2dBounds` has been replaced with `TextBounds`, and it now accepts
`Option`s to the bounds, instead of using `f32::INFINITY` to inidicate
lack of bounds
- Textsizes should be changed, dividing the current size with 1.2 will
result in the same size as before.
- `TextSettings` struct is removed
- Feature `subpixel_alignment` has been removed since cosmic-text
already does this automatically
- TextBundles and things rendering texts requires the `CosmicBuffer`
Component on them as well

## Suggested followups:

- TextPipeline: reconstruct byte indices for keeping track of eventual
cursors in text input
- TextPipeline: (future work) split text entities into section entities
- TextPipeline: (future work) text editing
- Support line height as an option. Unitless `1.2` is the default used
in browsers (1.2x font size).
- Support System Fonts and font families
- Example showing of animated text styles. Eg. throbbing hyperlinks

---------

Co-authored-by: tigregalis <anak.harimau@gmail.com>
Co-authored-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: sam edelsten <samedelsten1@gmail.com>
Co-authored-by: Dimchikkk <velo.app1@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Rob Parrett <robparrett@gmail.com>
2024-07-04 20:41:08 +00:00
..
bevy_a11y Bump accesskit to 0.16 (#14091) 2024-07-01 14:42:40 +00:00
bevy_animation Added get_main_animation for AnimationTransitions (#14104) 2024-07-02 13:28:42 +00:00
bevy_app Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
bevy_asset Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
bevy_audio Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
bevy_color Allow bevy_color use without bevy_reflect support (#13870) 2024-06-16 15:47:30 +00:00
bevy_core Don't show .to_bits in Display impl for Entity (#14011) 2024-06-25 17:08:24 +00:00
bevy_core_pipeline Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
bevy_derive Deprecate dynamic plugins (#13080) 2024-05-20 20:01:28 +00:00
bevy_dev_tools Merge BuildWorldChildren and BuildChildren traits. (#14052) 2024-07-01 14:29:39 +00:00
bevy_diagnostic Poll system information in separate tasks (#13693) 2024-06-10 19:06:22 +00:00
bevy_dylib Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_dynamic_plugin Deprecate dynamic plugins (#13080) 2024-05-20 20:01:28 +00:00
bevy_ecs use associated type bounds in QueryManyIter and QueryIter::sort() (#14107) 2024-07-02 13:39:22 +00:00
bevy_encase_derive Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_gilrs Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_gizmos Use u32 for all resolution/subdivision fields in bevy_gizmos (#13927) 2024-06-19 17:28:10 +00:00
bevy_gltf Added feature switch to default Standard Material's new anisotropy texture to off (#14048) 2024-07-02 18:02:05 +00:00
bevy_hierarchy Fix push_children inserting a Children component even when no children are supplied (#14109) 2024-07-02 13:27:02 +00:00
bevy_input Mouse input accumulation (#14044) 2024-07-01 14:27:21 +00:00
bevy_internal Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
bevy_log Document use of NO_COLOR in LogPlugin (#13984) 2024-06-24 21:04:55 +00:00
bevy_macro_utils Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00
bevy_math Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
bevy_mikktspace Fixed a link to Blender's mikktspace docs (#13924) 2024-06-19 12:37:10 +00:00
bevy_pbr Added feature switch to default Standard Material's new anisotropy texture to off (#14048) 2024-07-02 18:02:05 +00:00
bevy_picking Upstream CorePlugin from bevy_mod_picking (#13677) 2024-06-15 11:59:57 +00:00
bevy_ptr add Debug for ptr types (#13498) 2024-05-24 21:25:11 +00:00
bevy_reflect Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
bevy_render Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
bevy_scene Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
bevy_sprite Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
bevy_state Move StateTransitionSteps registration to states plugin (#13939) 2024-06-20 00:57:40 +00:00
bevy_tasks Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
bevy_text Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
bevy_time Make time_system public (#13879) 2024-06-16 18:07:41 +00:00
bevy_transform Merge BuildWorldChildren and BuildChildren traits. (#14052) 2024-07-01 14:29:39 +00:00
bevy_ui Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
bevy_utils Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
bevy_window apply window scale to window size when creating it (#13967) 2024-06-21 18:04:57 +00:00
bevy_winit Bump accesskit to 0.16 (#14091) 2024-07-01 14:42:40 +00:00