windows: Introduce Direct Write
(#10119)
This PR brings `Direct Write` to Zed. Now, Zed first trys to query dwrite interface, if not supported, which means runing on Windows below win10 1703), will choose `cosmic` as a fallback text system. This direct write text system supports: - Full font features support - Emoji support - Default system fonts as fallback ### Font features https://github.com/zed-industries/zed/assets/14981363/198eff88-47df-4bc8-a257-e3acf81fd61d ### Emoji  **Note: input emoji through IME or IMM not working yet, copy paste emoji works fine (will be fixed by #10125 )** ### Font fallback I use `Zed mono` which dose not support chinese chars to test font fallback https://github.com/zed-industries/zed/assets/14981363/c97d0847-0ac5-47e6-aa00-f3ce6d1e50a5 Release Notes: - N/A
This commit is contained in:
parent
1127b1a0de
commit
11a3d2b04b
6 changed files with 1329 additions and 8 deletions
|
@ -125,8 +125,11 @@ impl Platform for TestPlatform {
|
|||
#[cfg(target_os = "macos")]
|
||||
return Arc::new(crate::platform::mac::MacTextSystem::new());
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
return Arc::new(crate::platform::cosmic_text::CosmicTextSystem::new());
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
return Arc::new(crate::platform::windows::DirectWriteTextSystem::new().unwrap());
|
||||
}
|
||||
|
||||
fn run(&self, _on_finish_launching: Box<dyn FnOnce()>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue