Skip to content

Commit 0658a47

Browse files
committed
fix: update docs
1 parent 2fe1643 commit 0658a47

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

crates/bevy_text/src/font.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ use bevy_reflect::TypePath;
1919
pub enum Font {
2020
/// Content of a font file as bytes
2121
Data(Arc<Vec<u8>>),
22-
/// References a font installed on the system by family, weight, stretch, and style.
23-
System {
24-
/// A list of font families that satisfy this font requirement
22+
/// References a font inserted into the font database by family, weight, stretch, and style.
23+
///
24+
/// This can include system fonts, if enabled in [`super::TextPlugin`], or previously loaded fonts via [`Font::Data`].
25+
Query {
26+
/// A list of font families that satisfy this font requirement.
2527
families: Vec<Family>,
2628
/// Specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.
2729
///

crates/bevy_text/src/pipeline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ pub fn load_font_to_fontdb(
549549
// TODO: it is assumed this is the right font face
550550
*ids.last().unwrap()
551551
}
552-
Font::System {
552+
Font::Query {
553553
families,
554554
weight,
555555
stretch,

examples/2d/system_fonts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn main() {
1111
fn setup(mut commands: Commands, mut fonts: ResMut<Assets<Font>>) {
1212
commands.spawn(Camera2d);
1313

14-
let font = fonts.add(Font::System {
14+
let font = fonts.add(Font::Query {
1515
families: vec![
1616
Family::Name("Liberation Sans".to_string()),
1717
Family::Name("Ubuntu".to_string()),

0 commit comments

Comments
 (0)