mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-29 01:13:53 +03:00
bundle ttf
This commit is contained in:
parent
d95099efbe
commit
af7e12e52b
BIN
data/assets/DejaVuSans.ttf
Normal file
BIN
data/assets/DejaVuSans.ttf
Normal file
Binary file not shown.
1
data/assets/licenses.md
Normal file
1
data/assets/licenses.md
Normal file
@ -0,0 +1 @@
|
||||
DejaVuSans.ttf: https://dejavu-fonts.github.io/License.html
|
@ -37,13 +37,8 @@ impl Canvas {
|
||||
let texture_settings = TextureSettings::new().filter(Filter::Nearest);
|
||||
// TODO We could also preload everything and not need the RefCell.
|
||||
let glyphs = RefCell::new(
|
||||
GlyphCache::new(
|
||||
// TODO don't assume this exists!
|
||||
"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
|
||||
(),
|
||||
texture_settings,
|
||||
)
|
||||
.expect("Could not load font"),
|
||||
GlyphCache::new("../data/assets/DejaVuSans.ttf", (), texture_settings)
|
||||
.expect("Could not load font"),
|
||||
);
|
||||
|
||||
Canvas {
|
||||
|
Loading…
Reference in New Issue
Block a user