bundle ttf

This commit is contained in:
Dustin Carlino 2019-01-11 10:13:29 -08:00
parent d95099efbe
commit af7e12e52b
3 changed files with 3 additions and 7 deletions

BIN
data/assets/DejaVuSans.ttf Normal file

Binary file not shown.

1
data/assets/licenses.md Normal file
View File

@ -0,0 +1 @@
DejaVuSans.ttf: https://dejavu-fonts.github.io/License.html

View File

@ -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 {