linux: enable test TextSystem (#9037)

Make text tests work on linux.
This commit is contained in:
Rom Grk 2024-03-07 18:51:52 -05:00 committed by GitHub
parent a90a667fd0
commit 2d83580df4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,6 @@ mod window;
pub(crate) use dispatcher::*;
pub(crate) use display::*;
pub(crate) use platform::*;
#[cfg(not(target_os = "macos"))]
#[cfg(target_os = "windows")]
pub(crate) use text_system::*;
pub(crate) use window::*;

View File

@ -121,7 +121,7 @@ impl Platform for TestPlatform {
fn text_system(&self) -> Arc<dyn PlatformTextSystem> {
#[cfg(target_os = "linux")]
return Arc::new(crate::platform::test::TestTextSystem {});
return Arc::new(crate::platform::linux::LinuxTextSystem::new());
#[cfg(target_os = "macos")]
return Arc::new(crate::platform::mac::MacTextSystem::new());

View File

@ -63,7 +63,10 @@ impl TextSystem {
// TODO: This is currently Zed-specific.
// We should allow GPUI users to provide their own fallback font stack.
font("Zed Mono"),
font("Helvetica")
font("Helvetica"),
font("Cantarell"), // Gnome
font("Ubuntu"), // Gnome (Ubuntu)
font("Noto Sans"), // KDE
],
}
}