1- use crate :: pipeline:: CosmicFontSystem ;
2- use crate :: {
3- ComputedTextBlock , Font , FontAtlasSets , LineBreak , SwashCache , TextBounds , TextColor ,
4- TextError , TextFont , TextLayout , TextLayoutInfo , TextPipeline , TextReader , TextRoot ,
1+ use bevy_text:: {
2+ ComputedTextBlock , CosmicFontSystem , Font , FontAtlasSets , LineBreak , SwashCache , TextBounds ,
3+ TextColor , TextError , TextFont , TextLayout , TextLayoutInfo , TextPipeline , TextReader , TextRoot ,
54 TextSpanAccess , TextWriter ,
65} ;
76
7+ use crate :: { Anchor , Sprite } ;
88use bevy_asset:: Assets ;
99use bevy_camera:: primitives:: Aabb ;
1010use bevy_camera:: visibility:: { self , NoFrustumCulling , Visibility , VisibilityClass } ;
@@ -22,7 +22,6 @@ use bevy_ecs::{
2222use bevy_image:: prelude:: * ;
2323use bevy_math:: { Vec2 , Vec3 } ;
2424use bevy_reflect:: { prelude:: ReflectDefault , Reflect } ;
25- use bevy_sprite:: { Anchor , Sprite } ;
2625use bevy_transform:: components:: Transform ;
2726use bevy_window:: { PrimaryWindow , Window } ;
2827
@@ -32,7 +31,7 @@ use bevy_window::{PrimaryWindow, Window};
3231/// [Example usage.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/text2d.rs)
3332///
3433/// The string in this component is the first 'text span' in a hierarchy of text spans that are collected into
35- /// a [`ComputedTextBlock`]. See [ `TextSpan`](crate::TextSpan) for the component used by children of entities with [`Text2d`].
34+ /// a [`ComputedTextBlock`]. See `TextSpan` for the component used by children of entities with [`Text2d`].
3635///
3736/// With `Text2d` the `justify` field of [`TextLayout`] only affects the internal alignment of a block of text and not its
3837/// relative position, which is controlled by the [`Anchor`] component.
@@ -44,7 +43,8 @@ use bevy_window::{PrimaryWindow, Window};
4443/// # use bevy_color::Color;
4544/// # use bevy_color::palettes::basic::BLUE;
4645/// # use bevy_ecs::world::World;
47- /// # use bevy_text::{Font, Justify, Text2d, TextLayout, TextFont, TextColor, TextSpan};
46+ /// # use bevy_text::{Font, Justify, TextLayout, TextFont, TextColor, TextSpan};
47+ /// # use bevy_sprite::Text2d;
4848/// #
4949/// # let font_handle: Handle<Font> = Default::default();
5050/// # let mut world = World::default();
@@ -278,8 +278,7 @@ mod tests {
278278 use bevy_app:: { App , Update } ;
279279 use bevy_asset:: { load_internal_binary_asset, Handle } ;
280280 use bevy_ecs:: schedule:: IntoScheduleConfigs ;
281-
282- use crate :: { detect_text_needs_rerender, TextIterScratch } ;
281+ use bevy_text:: { detect_text_needs_rerender, TextIterScratch } ;
283282
284283 use super :: * ;
285284
@@ -310,7 +309,7 @@ mod tests {
310309 load_internal_binary_asset ! (
311310 app,
312311 Handle :: default ( ) ,
313- "FiraMono-subset.ttf" ,
312+ "../../bevy_text/src/ FiraMono-subset.ttf" ,
314313 |bytes: & [ u8 ] , _path: String | { Font :: try_from_bytes( bytes. to_vec( ) ) . unwrap( ) }
315314 ) ;
316315
0 commit comments