@@ -49,7 +49,7 @@ impl Context {
4949 }
5050 let font = & self . state . font ;
5151
52- let measurement = font. get_font ( self . device ) . measure_str ( text, Some ( paint) ) ;
52+ let measurement = font. to_skia ( ) . measure_str ( text, Some ( paint) ) ;
5353 let font_width = measurement. 0 ;
5454 let max_width = width;
5555 let width: f32 ;
@@ -59,7 +59,7 @@ impl Context {
5959 } else {
6060 width = font_width;
6161 }
62- let metrics = font. get_font ( self . device ) . metrics ( ) ;
62+ let metrics = font. to_skia ( ) . metrics ( ) ;
6363 let baseline = get_font_baseline ( metrics. 1 , self . state . text_baseline ) ;
6464 let mut location: Point = ( x, y + baseline) . into ( ) ;
6565
@@ -74,7 +74,7 @@ impl Context {
7474 // NOOP
7575 }
7676 }
77- let ( line_spacing, metrics) = font. get_font ( self . device ) . metrics ( ) ;
77+ let ( line_spacing, metrics) = font. to_skia ( ) . metrics ( ) ;
7878
7979 let mut rect: ( Point , Size ) = (
8080 (
@@ -102,7 +102,7 @@ impl Context {
102102 self . surface . canvas ( ) . scale ( ( scale_x, 1.0 ) ) ;
103103 }
104104
105- let font = font. get_font ( self . device ) ;
105+ let font = font. to_skia ( ) ;
106106 if let Some ( shadow_paint) = shadow_paint {
107107 self . surface
108108 . canvas ( )
@@ -118,9 +118,9 @@ impl Context {
118118 let ( width, bounds) = self
119119 . state
120120 . font
121- . get_font ( self . device )
121+ . to_skia ( )
122122 . measure_str ( text, Some ( self . state . paint . fill_paint ( ) ) ) ;
123- let ( _, metrics) = self . state . font . get_font ( self . device ) . metrics ( ) ;
123+ let ( _, metrics) = self . state . font . to_skia ( ) . metrics ( ) ;
124124 let ascent = metrics. ascent ;
125125 let descent = metrics. descent ;
126126 let baseline_y = get_font_baseline ( metrics, self . state . text_baseline ) ;
0 commit comments