@@ -28,14 +28,12 @@ impl Text {
28
28
/// # use bevy_render::color::Color;
29
29
/// # use bevy_text::{Font, Text, TextAlignment, TextStyle, HorizontalAlign, VerticalAlign};
30
30
/// #
31
- /// # let font_handle: Handle<Font> = Default::default();
32
- /// #
33
31
/// // Basic usage.
34
32
/// let hello_world = Text::from_section(
35
33
/// // Accepts a String or any type that converts into a String, such as &str.
36
34
/// "hello world!",
37
35
/// TextStyle {
38
- /// font: font_handle.clone (),
36
+ /// font: "path/to/font".into (),
39
37
/// font_size: 60.0,
40
38
/// color: Color::WHITE,
41
39
/// },
@@ -44,7 +42,7 @@ impl Text {
44
42
/// let hello_bevy = Text::from_section(
45
43
/// "hello bevy!",
46
44
/// TextStyle {
47
- /// font: font_handle ,
45
+ /// font: "path/to/font".into() ,
48
46
/// font_size: 60.0,
49
47
/// color: Color::WHITE,
50
48
/// },
@@ -65,21 +63,19 @@ impl Text {
65
63
/// # use bevy_render::color::Color;
66
64
/// # use bevy_text::{Font, Text, TextStyle, TextSection};
67
65
/// #
68
- /// # let font_handle: Handle<Font> = Default::default();
69
- /// #
70
66
/// let hello_world = Text::from_sections([
71
67
/// TextSection::new(
72
68
/// "Hello, ",
73
69
/// TextStyle {
74
- /// font: font_handle.clone (),
70
+ /// font: "path/to/font".into (),
75
71
/// font_size: 60.0,
76
72
/// color: Color::BLUE,
77
73
/// },
78
74
/// ),
79
75
/// TextSection::new(
80
76
/// "World!",
81
77
/// TextStyle {
82
- /// font: font_handle ,
78
+ /// font: "path/to/font".into() ,
83
79
/// font_size: 60.0,
84
80
/// color: Color::RED,
85
81
/// },
0 commit comments