Linux: Experiment with CosmicText based Text System (#7539)

This is a rebase of @gabydds text_system updates. with some small
cleanups.

Currently cannot test this as build is not working in linux. Im just
putting it up here before I forget about it.

---------

Co-authored-by: gabydd <gabydinnerdavid@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
h3mosphere 2024-02-09 17:49:03 +11:00 committed by GitHub
parent 0ab1094f0c
commit 67d280b8cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 531 additions and 47 deletions

View file

@ -208,8 +208,12 @@ impl Default for TextStyle {
fn default() -> Self {
TextStyle {
color: black(),
// Helvetica is a web safe font, so it should be available
font_family: "Helvetica".into(),
// todo!(linux) make this configurable or choose better default
font_family: if cfg!(target_os = "linux") {
"FreeMono".into()
} else {
"Helvetica".into()
},
font_features: FontFeatures::default(),
font_size: rems(1.).into(),
line_height: phi(),