File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
internal/renderers/femtovg Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ derive_more = { workspace = true }
3434lyon_path = " 1.0"
3535pin-weak = " 1"
3636scoped-tls-hkt = " 0.1"
37- femtovg = { git = " https://github.com/slint-ui/femtovg" , branch = " simon/draw-glyphs " }
37+ femtovg = { git = " https://github.com/slint-ui/femtovg" , branch = " simon/draw-glyph-run " }
3838ttf-parser = { workspace = true }
3939unicode-script = { version = " 0.5.4" } # Use the same version was femtovg's rustybuzz, to avoid duplicate crates
4040imgref = { version = " 1.6.1" }
Original file line number Diff line number Diff line change @@ -215,22 +215,21 @@ fn draw_glyphs<R: femtovg::Renderer + TextureImporter>(
215215 femtovg:: PositionedGlyph {
216216 x : glyph. x ,
217217 y : glyph. y + layout. y_offset ,
218- font_id,
219218 glyph_id : glyph. id ,
220219 }
221220 } ) ;
222221
223222 match brush. stroke {
224223 Some ( i_slint_core:: items:: TextStrokeStyle :: Outside ) => {
225- canvas. stroke_glyphs ( glyphs. clone ( ) , paint) . unwrap ( ) ;
226- canvas. fill_glyphs ( glyphs, paint) . unwrap ( ) ;
224+ canvas. stroke_glyph_run ( font_id , glyphs. clone ( ) , paint) . unwrap ( ) ;
225+ canvas. fill_glyph_run ( font_id , glyphs, paint) . unwrap ( ) ;
227226 }
228227 Some ( i_slint_core:: items:: TextStrokeStyle :: Center ) => {
229- canvas. fill_glyphs ( glyphs. clone ( ) , paint) . unwrap ( ) ;
230- canvas. stroke_glyphs ( glyphs, paint) . unwrap ( ) ;
228+ canvas. fill_glyph_run ( font_id , glyphs. clone ( ) , paint) . unwrap ( ) ;
229+ canvas. stroke_glyph_run ( font_id , glyphs, paint) . unwrap ( ) ;
231230 }
232231 None => {
233- canvas. fill_glyphs ( glyphs, paint) . unwrap ( ) ;
232+ canvas. fill_glyph_run ( font_id , glyphs, paint) . unwrap ( ) ;
234233 }
235234 }
236235 }
You can’t perform that action at this time.
0 commit comments