diff --git a/wezterm-font/src/locator/gdi.rs b/wezterm-font/src/locator/gdi.rs index 5e2debb1d..576d159f9 100644 --- a/wezterm-font/src/locator/gdi.rs +++ b/wezterm-font/src/locator/gdi.rs @@ -57,7 +57,7 @@ fn extract_font_data(font: HFONT, attr: &FontAttributes) -> anyhow::Result, + data: Arc>, }, } @@ -176,3 +176,21 @@ impl FontLocator for NopSystemSource { Ok(vec![]) } } + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_memory_datasource() { + // This is currently only used on Windows, so make sure + // that we have compiler coverage of constructing it on + // other systems + let data = b"hello".to_vec(); + let source = FontDataSource::Memory { + data: Arc::new(data.into_boxed_slice()), + name: "hello!".to_string(), + }; + eprintln!("{:?}", source); + } +}