Skip to content

Commit 42d735d

Browse files
committed
doc check
1 parent 00904a9 commit 42d735d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

crates/bevy_text/src/font.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Font {
4848
/// A reference to a font asset.
4949
#[derive(Clone, Debug, Reflect, FromReflect, Default)]
5050
pub enum FontRef {
51-
/// Use the default font it can be configured with the [`DefaultFont`] resource
51+
/// Use the default font it can be configured with the `DefaultFont` resource
5252
#[default]
5353
Default,
5454
/// A handle to a font stored in the [`Assets<Font>`](bevy_asset::Assets) resource

crates/bevy_text/src/text.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ impl Text {
2828
/// # use bevy_render::color::Color;
2929
/// # use bevy_text::{Font, Text, TextAlignment, TextStyle, HorizontalAlign, VerticalAlign};
3030
/// #
31-
/// # let font_handle: Handle<Font> = Default::default();
32-
/// #
3331
/// // Basic usage.
3432
/// let hello_world = Text::from_section(
3533
/// // Accepts a String or any type that converts into a String, such as &str.
3634
/// "hello world!",
3735
/// TextStyle {
38-
/// font: font_handle.clone(),
36+
/// font: "path/to/font".into(),
3937
/// font_size: 60.0,
4038
/// color: Color::WHITE,
4139
/// },
@@ -44,7 +42,7 @@ impl Text {
4442
/// let hello_bevy = Text::from_section(
4543
/// "hello bevy!",
4644
/// TextStyle {
47-
/// font: font_handle,
45+
/// font: "path/to/font".into(),
4846
/// font_size: 60.0,
4947
/// color: Color::WHITE,
5048
/// },
@@ -65,21 +63,19 @@ impl Text {
6563
/// # use bevy_render::color::Color;
6664
/// # use bevy_text::{Font, Text, TextStyle, TextSection};
6765
/// #
68-
/// # let font_handle: Handle<Font> = Default::default();
69-
/// #
7066
/// let hello_world = Text::from_sections([
7167
/// TextSection::new(
7268
/// "Hello, ",
7369
/// TextStyle {
74-
/// font: font_handle.clone(),
70+
/// font: "path/to/font".into(),
7571
/// font_size: 60.0,
7672
/// color: Color::BLUE,
7773
/// },
7874
/// ),
7975
/// TextSection::new(
8076
/// "World!",
8177
/// TextStyle {
82-
/// font: font_handle,
78+
/// font: "path/to/font".into(),
8379
/// font_size: 60.0,
8480
/// color: Color::RED,
8581
/// },

0 commit comments

Comments
 (0)