🎉 Add text shadows (#6335)

This commit is contained in:
Elena Torró 2025-04-24 12:19:41 +02:00 committed by GitHub
parent 14e8026e30
commit c2ae58bf08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 93 additions and 7 deletions

View file

@ -371,7 +371,12 @@ impl RenderState {
self.surfaces.apply_mut(&[SurfaceId::Fills], |s| {
s.canvas().concat(&matrix);
});
text::render(self, &shape, text_content);
let paragraphs = text_content.to_skia_paragraphs(&self.fonts.font_collection());
shadows::render_text_drop_shadows(self, &shape, &paragraphs, antialias);
text::render(self, &shape, &paragraphs, None, None);
shadows::render_text_inner_shadows(self, &shape, &paragraphs, antialias);
}
_ => {
self.surfaces.apply_mut(