Make CosmicTextSystem
Linux-only (#14728)
Since `WindowsDispatcher` requires a minimum Windows version of Windows 10 Fall Creators Update (10.0.16299), and the `alacritty_terminal` dependency relies on conPTY, an API introduced in the same version, additionally, `DirectWriteTextSystem` also relies on Windows 10 Fall Creators Update (10.0.16299), so it seems reasonable to make `CosmicTextSystem` Linux-only. And we can use `DirectWriteTextSystem` on the Windows platform exclusively. I hope this approach makes sense. Release Notes: - N/A
This commit is contained in:
parent
a60b3b9389
commit
82d6ad4616
7 changed files with 11 additions and 28 deletions
|
@ -4,9 +4,6 @@
|
|||
mod app_menu;
|
||||
mod keystroke;
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
mod cosmic_text;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
mod linux;
|
||||
|
||||
|
@ -51,8 +48,6 @@ use uuid::Uuid;
|
|||
pub use app_menu::*;
|
||||
pub use keystroke::*;
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
pub(crate) use cosmic_text::*;
|
||||
#[cfg(target_os = "linux")]
|
||||
pub(crate) use linux::*;
|
||||
#[cfg(target_os = "macos")]
|
||||
|
@ -105,7 +100,6 @@ pub fn guess_compositor() -> &'static str {
|
|||
}
|
||||
}
|
||||
|
||||
// todo("windows")
|
||||
#[cfg(target_os = "windows")]
|
||||
pub(crate) fn current_platform(_headless: bool) -> Rc<dyn Platform> {
|
||||
Rc::new(WindowsPlatform::new())
|
||||
|
@ -413,8 +407,6 @@ pub(crate) trait PlatformTextSystem: Send + Sync {
|
|||
raster_bounds: Bounds<DevicePixels>,
|
||||
) -> Result<(Size<DevicePixels>, Vec<u8>)>;
|
||||
fn layout_line(&self, text: &str, font_size: Pixels, runs: &[FontRun]) -> LineLayout;
|
||||
#[cfg(target_os = "windows")]
|
||||
fn destroy(&self);
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Hash, Clone)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue