bevy_bitmap_text 0.1.0

Glyph-as-Entity dynamic atlas text rendering for Bevy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use bevy::prelude::*;

/// Identifies a loaded font by name.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Reflect)]
pub struct FontId(pub String);

impl FontId {
    pub fn from_name(name: &str) -> Self {
        Self(name.to_string())
    }
}

impl<S: Into<String>> From<S> for FontId {
    fn from(s: S) -> Self {
        Self(s.into())
    }
}