|
1 | 1 | use anyrender::{NormalizedCoord, Paint, PaintRef, PaintScene, RenderContext}; |
2 | | -use kurbo::{Affine, Rect, Shape, Stroke}; |
| 2 | +use glifo::FontEmbolden; |
| 3 | +use kurbo::{Affine, Diagonal2, Rect, Shape, Stroke}; |
3 | 4 | use peniko::{BlendMode, Color, Fill, FontData, ImageBrush, ImageData, StyleRef}; |
4 | 5 | use rustc_hash::FxHashMap; |
5 | 6 | use vello_common::paint::{ImageId, ImageSource, PaintType}; |
@@ -196,7 +197,7 @@ impl PaintScene for VelloHybridScenePainter<'_> { |
196 | 197 | font_size: f32, |
197 | 198 | hint: bool, |
198 | 199 | normalized_coords: &'a [NormalizedCoord], |
199 | | - _embolden: kurbo::Vec2, |
| 200 | + embolden: kurbo::Vec2, |
200 | 201 | style: impl Into<StyleRef<'a>>, |
201 | 202 | paint: impl Into<PaintRef<'a>>, |
202 | 203 | _brush_alpha: f32, |
@@ -225,6 +226,7 @@ impl PaintScene for VelloHybridScenePainter<'_> { |
225 | 226 | .font_size(font_size) |
226 | 227 | .hint(hint) |
227 | 228 | .normalized_coords(normalized_coords) |
| 229 | + .font_embolden(FontEmbolden::new(Diagonal2::new(embolden.x, embolden.y))) |
228 | 230 | .glyph_transform(glyph_transform.unwrap_or_default()) |
229 | 231 | .fill_glyphs(glyphs.map(into_vello_hybrid_glyph)); |
230 | 232 | } |
|
0 commit comments