Skip to content

Commit 8dc0b42

Browse files
authored
Use correct font path in feathers labels (#23945)
Introduced a bug in previous PR. @alice-i-cecile @ickshonpe
1 parent 47e7352 commit 8dc0b42

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • crates/bevy_feathers/src/display

crates/bevy_feathers/src/display/label.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ use bevy_scene::{bsn, Scene};
44
use bevy_text::{FontSourceTemplate, FontWeight, TextFont};
55
use bevy_ui::widget::Text;
66

7-
use crate::{constants::size, theme::ThemeTextColor, tokens};
7+
use crate::{
8+
constants::{fonts, size},
9+
theme::ThemeTextColor,
10+
tokens,
11+
};
812

913
/// A text label.
1014
pub fn label(text: impl Into<String>) -> impl Scene {
1115
bsn! {
1216
Text(text)
1317
TextFont {
14-
font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
18+
font: FontSourceTemplate::Handle(fonts::REGULAR),
1519
font_size: size::MEDIUM_FONT,
1620
weight: FontWeight::NORMAL,
1721
}
@@ -25,7 +29,7 @@ pub fn label_dim(text: impl Into<String>) -> impl Scene {
2529
bsn! {
2630
Text(text)
2731
TextFont {
28-
font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
32+
font: FontSourceTemplate::Handle(fonts::REGULAR),
2933
font_size: size::MEDIUM_FONT,
3034
weight: FontWeight::NORMAL,
3135
}
@@ -39,7 +43,7 @@ pub fn label_small(text: impl Into<String>) -> impl Scene {
3943
bsn! {
4044
Text(text)
4145
TextFont {
42-
font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
46+
font: FontSourceTemplate::Handle(fonts::REGULAR),
4347
font_size: size::EXTRA_SMALL_FONT,
4448
weight: FontWeight::NORMAL,
4549
}

0 commit comments

Comments
 (0)