mirror of
https://github.com/bevyengine/bevy.git
synced 2026-05-06 06:06:42 -04:00
Use correct font path in feathers labels (#23945)
Introduced a bug in previous PR. @alice-i-cecile @ickshonpe
This commit is contained in:
@@ -4,14 +4,18 @@ use bevy_scene::{bsn, Scene};
|
||||
use bevy_text::{FontSourceTemplate, FontWeight, TextFont};
|
||||
use bevy_ui::widget::Text;
|
||||
|
||||
use crate::{constants::size, theme::ThemeTextColor, tokens};
|
||||
use crate::{
|
||||
constants::{fonts, size},
|
||||
theme::ThemeTextColor,
|
||||
tokens,
|
||||
};
|
||||
|
||||
/// A text label.
|
||||
pub fn label(text: impl Into<String>) -> impl Scene {
|
||||
bsn! {
|
||||
Text(text)
|
||||
TextFont {
|
||||
font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
|
||||
font: FontSourceTemplate::Handle(fonts::REGULAR),
|
||||
font_size: size::MEDIUM_FONT,
|
||||
weight: FontWeight::NORMAL,
|
||||
}
|
||||
@@ -25,7 +29,7 @@ pub fn label_dim(text: impl Into<String>) -> impl Scene {
|
||||
bsn! {
|
||||
Text(text)
|
||||
TextFont {
|
||||
font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
|
||||
font: FontSourceTemplate::Handle(fonts::REGULAR),
|
||||
font_size: size::MEDIUM_FONT,
|
||||
weight: FontWeight::NORMAL,
|
||||
}
|
||||
@@ -39,7 +43,7 @@ pub fn label_small(text: impl Into<String>) -> impl Scene {
|
||||
bsn! {
|
||||
Text(text)
|
||||
TextFont {
|
||||
font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
|
||||
font: FontSourceTemplate::Handle(fonts::REGULAR),
|
||||
font_size: size::EXTRA_SMALL_FONT,
|
||||
weight: FontWeight::NORMAL,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user