diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-03 11:18:25 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-03 11:18:25 +0200 |
| commit | 75e6dbfbe6cbd3c3245c825627881a16bfbd6c5d (patch) | |
| tree | 587b57e5ab09b72ca0d2a5c25cf2cb8f8579303e /src/layout/shaping.rs | |
| parent | 730715c064294337ee9befc3b9332d45eb74818f (diff) | |
Rename bold/italic to strong/emph ✏
Diffstat (limited to 'src/layout/shaping.rs')
| -rw-r--r-- | src/layout/shaping.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/layout/shaping.rs b/src/layout/shaping.rs index 115a23e2..0f42d4bb 100644 --- a/src/layout/shaping.rs +++ b/src/layout/shaping.rs @@ -14,7 +14,7 @@ use crate::font::FontLoader; use crate::geom::Size; use crate::style::TextStyle; -/// Layouts text into a box. +/// Shape text into a box. pub async fn shape(text: &str, ctx: ShapeOptions<'_>) -> BoxLayout { Shaper::new(text, ctx).layout().await } @@ -115,11 +115,11 @@ impl<'a> Shaper<'a> { async fn select_font(&mut self, c: char) -> Option<(FaceId, GlyphId, f64)> { let mut variant = self.opts.style.variant; - if self.opts.style.bolder { + if self.opts.style.strong { variant.weight = variant.weight.thicken(300); } - if self.opts.style.italic { + if self.opts.style.emph { variant.style = match variant.style { FontStyle::Normal => FontStyle::Italic, FontStyle::Italic => FontStyle::Normal, |
