From 179bb7aad7103aafb628e7f67822c5fa8b9bc558 Mon Sep 17 00:00:00 2001 From: Taylor Holliday Date: Sun, 10 Dec 2023 00:51:18 -0800 Subject: [PATCH] Update fontdue to 0.8.0 --- Cargo.toml | 2 +- src/glyphs.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a9a8839..32cc726 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ edition = "2018" [dependencies] wgpu = "0.18.0" euclid = "0.22.7" -fontdue = "0.7.2" +fontdue = "0.8.0" rect_packer = "0.2.1" [dev-dependencies] diff --git a/src/glyphs.rs b/src/glyphs.rs index 258a0cb..2ad05f9 100644 --- a/src/glyphs.rs +++ b/src/glyphs.rs @@ -16,10 +16,9 @@ pub struct GlyphCache { impl GlyphCache { pub fn new(device: &wgpu::Device) -> Self { - let settings = fontdue::FontSettings { - collection_index: 0, - scale: 100.0, - }; + let mut settings = fontdue::FontSettings::default(); + settings.collection_index = 0; + settings.scale = 100.0; let font = include_bytes!("fonts/Anodina-Regular.ttf") as &[u8]; Self {