File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
34
34
// Accepts a `String` or any type that converts into a `String`, such as `&str`
35
35
"hello\n bevy!" ,
36
36
TextStyle {
37
+ // This font is loaded and will be used instead of the default font.
37
38
font : asset_server. load ( "fonts/FiraSans-Bold.ttf" ) ,
38
39
font_size : 100.0 ,
39
40
color : Color :: WHITE ,
@@ -56,15 +57,17 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
56
57
TextSection :: new (
57
58
"FPS: " ,
58
59
TextStyle {
60
+ // This font is loaded and will be used instead of the default font.
59
61
font : asset_server. load ( "fonts/FiraSans-Bold.ttf" ) ,
60
62
font_size : 60.0 ,
61
63
color : Color :: WHITE ,
62
64
} ,
63
65
) ,
64
66
TextSection :: from_style ( TextStyle {
65
- font : asset_server. load ( "fonts/FiraMono-Medium.ttf" ) ,
66
67
font_size : 60.0 ,
67
68
color : Color :: GOLD ,
69
+ // If no font is specified, it will use the default font.
70
+ ..default ( )
68
71
} ) ,
69
72
] ) ,
70
73
FpsText ,
You can’t perform that action at this time.
0 commit comments