summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/text/smallcaps.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/text/smallcaps.rs')
-rw-r--r--crates/typst-library/src/text/smallcaps.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/typst-library/src/text/smallcaps.rs b/crates/typst-library/src/text/smallcaps.rs
index 924a45e8..1c283893 100644
--- a/crates/typst-library/src/text/smallcaps.rs
+++ b/crates/typst-library/src/text/smallcaps.rs
@@ -64,8 +64,9 @@ pub struct SmallcapsElem {
impl Show for Packed<SmallcapsElem> {
#[typst_macros::time(name = "smallcaps", span = self.span())]
fn show(&self, _: &mut Engine, styles: StyleChain) -> SourceResult<Content> {
- let sc = if self.all(styles) { Smallcaps::All } else { Smallcaps::Minuscules };
- Ok(self.body.clone().styled(TextElem::set_smallcaps(Some(sc))))
+ let sc =
+ if self.all.get(styles) { Smallcaps::All } else { Smallcaps::Minuscules };
+ Ok(self.body.clone().set(TextElem::smallcaps, Some(sc)))
}
}