Avoid storing fonts::Features
in TextStyle
We were only using it for debugging purposes and that was causing the `Theme` struct to become too big to hold on the stack. Co-Authored-By: Julia Risley <julia@zed.dev>
This commit is contained in:
parent
4d915f4530
commit
786d95b8c8
4 changed files with 0 additions and 7 deletions
|
@ -6779,7 +6779,6 @@ fn build_style(
|
||||||
text: TextStyle {
|
text: TextStyle {
|
||||||
color: settings.theme.editor.text_color,
|
color: settings.theme.editor.text_color,
|
||||||
font_family_name,
|
font_family_name,
|
||||||
font_features: settings.buffer_font_features.clone(),
|
|
||||||
font_family_id,
|
font_family_id,
|
||||||
font_id,
|
font_id,
|
||||||
font_size,
|
font_size,
|
||||||
|
|
|
@ -63,7 +63,6 @@ pub struct Features {
|
||||||
pub struct TextStyle {
|
pub struct TextStyle {
|
||||||
pub color: Color,
|
pub color: Color,
|
||||||
pub font_family_name: Arc<str>,
|
pub font_family_name: Arc<str>,
|
||||||
pub font_features: Features,
|
|
||||||
pub font_family_id: FamilyId,
|
pub font_family_id: FamilyId,
|
||||||
pub font_id: FontId,
|
pub font_id: FontId,
|
||||||
pub font_size: f32,
|
pub font_size: f32,
|
||||||
|
@ -160,7 +159,6 @@ impl TextStyle {
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
color,
|
color,
|
||||||
font_family_name,
|
font_family_name,
|
||||||
font_features,
|
|
||||||
font_family_id,
|
font_family_id,
|
||||||
font_id,
|
font_id,
|
||||||
font_size,
|
font_size,
|
||||||
|
@ -307,7 +305,6 @@ impl Default for TextStyle {
|
||||||
Self {
|
Self {
|
||||||
color: Default::default(),
|
color: Default::default(),
|
||||||
font_family_name,
|
font_family_name,
|
||||||
font_features: Default::default(),
|
|
||||||
font_family_id,
|
font_family_id,
|
||||||
font_id,
|
font_id,
|
||||||
font_size: 14.,
|
font_size: 14.,
|
||||||
|
@ -389,7 +386,6 @@ impl ToJson for TextStyle {
|
||||||
json!({
|
json!({
|
||||||
"color": self.color.to_json(),
|
"color": self.color.to_json(),
|
||||||
"font_family": self.font_family_name.as_ref(),
|
"font_family": self.font_family_name.as_ref(),
|
||||||
"font_features": serde_json::to_value(&self.font_features).unwrap(),
|
|
||||||
"font_properties": self.font_properties.to_json(),
|
"font_properties": self.font_properties.to_json(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -537,7 +537,6 @@ impl TerminalElement {
|
||||||
color: settings.theme.editor.text_color,
|
color: settings.theme.editor.text_color,
|
||||||
font_family_id: family_id,
|
font_family_id: family_id,
|
||||||
font_family_name: font_cache.family_name(family_id).unwrap(),
|
font_family_name: font_cache.family_name(family_id).unwrap(),
|
||||||
font_features: font_features.clone(),
|
|
||||||
font_id,
|
font_id,
|
||||||
font_size,
|
font_size,
|
||||||
font_properties: Default::default(),
|
font_properties: Default::default(),
|
||||||
|
|
|
@ -243,7 +243,6 @@ impl ThemeTestbench {
|
||||||
color: style.foreground,
|
color: style.foreground,
|
||||||
font_family_id: family_id,
|
font_family_id: family_id,
|
||||||
font_family_name: font_cache.family_name(family_id).unwrap(),
|
font_family_name: font_cache.family_name(family_id).unwrap(),
|
||||||
font_features: settings.buffer_font_features.clone(),
|
|
||||||
font_id,
|
font_id,
|
||||||
font_size,
|
font_size,
|
||||||
font_properties: Default::default(),
|
font_properties: Default::default(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue