mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 07:31:38 +02:00
🎉 Add text shadows (#6335)
This commit is contained in:
parent
14e8026e30
commit
c2ae58bf08
5 changed files with 93 additions and 7 deletions
|
@ -65,6 +65,15 @@ impl TextContent {
|
|||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn to_skia_paragraphs(&self, fonts: &FontCollection) -> Vec<skia::textlayout::Paragraph> {
|
||||
let mut paragraphs = Vec::new();
|
||||
for mut skia_paragraph in self.to_paragraphs(fonts) {
|
||||
skia_paragraph.layout(self.width());
|
||||
paragraphs.push(skia_paragraph);
|
||||
}
|
||||
paragraphs
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for TextContent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue