make shaping a const

This commit is contained in:
2025-11-17 21:38:40 -05:00
parent c7b255be4f
commit 7e257fd042
3 changed files with 7 additions and 16 deletions

View File

@@ -8,6 +8,8 @@ use crate::{prelude::*, util::MutDetect};
use cosmic_text::{Attrs, Metrics, Shaping};
use std::ops::{Deref, DerefMut};
pub const SHAPING: Shaping = Shaping::Advanced;
pub struct Text {
pub content: MutDetect<String>,
view: TextView,
@@ -74,7 +76,7 @@ impl Text {
&mut ctx.text.font_system,
&self.content,
&Attrs::new().family(self.view.attrs.family),
Shaping::Advanced,
SHAPING,
None,
);
}