Remove re-exports of cosmic_text types (#19516)
# Objective As discussed in #19285, we do a poor job at keeping the namespace tidy and free of duplicates / user-conflicting names in places. `cosmic_text` re-exports were the worst offender. ## Solution Remove the re-exports completely. While the type aliases were quite thoughtful, they weren't used in any of our code / API.
This commit is contained in:
parent
5df9c53977
commit
e1230fdc54
@ -1,8 +1,3 @@
|
||||
pub use cosmic_text::{
|
||||
self, FamilyOwned as FontFamily, Stretch as FontStretch, Style as FontStyle,
|
||||
Weight as FontWeight,
|
||||
};
|
||||
|
||||
use crate::{Font, TextLayoutInfo, TextSpanAccess, TextSpanComponent};
|
||||
use bevy_asset::Handle;
|
||||
use bevy_color::Color;
|
||||
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Removed `cosmic_text` re-exports
|
||||
pull_requests: [TODO]
|
||||
---
|
||||
|
||||
Previously, `bevy_text` re-exported the entirety of `cosmic_text` while renaming a few of the most confusing re-exports,
|
||||
using the following code.
|
||||
|
||||
```rust
|
||||
pub use cosmic_text::{
|
||||
self, FamilyOwned as FontFamily, Stretch as FontStretch, Style as FontStyle, Weight as FontWeight,
|
||||
};
|
||||
```
|
||||
|
||||
These re-exports commonly conflicted with other types (like `Query`!), leading to messy autocomplete errors.
|
||||
Ultimately, these are largely an implementation detail, and were not widely used.
|
||||
|
||||
We've completely removed these re-exports (including the renamed types): if you need to use these types, please rely on them directly from `cosmic_text`, being sure that the version number you are using matches the version used by your version of `bevy_text`.
|
Loading…
Reference in New Issue
Block a user