@@ -52,7 +52,7 @@ pub trait GlyphRenderer: crate::item_rendering::ItemRenderer {
52
52
/// given y offset.
53
53
fn draw_glyph_run (
54
54
& mut self ,
55
- font : & parley:: Font ,
55
+ font : & parley:: FontData ,
56
56
font_size : f32 ,
57
57
brush : Self :: PlatformBrush ,
58
58
y_offset : PhysicalLength ,
@@ -238,7 +238,7 @@ fn layout(text: &str, scale_factor: ScaleFactor, options: LayoutOptions) -> Layo
238
238
max_physical_width. map ( |width| width. get ( ) ) ,
239
239
match options. horizontal_align {
240
240
TextHorizontalAlignment :: Left => parley:: Alignment :: Left ,
241
- TextHorizontalAlignment :: Center => parley:: Alignment :: Middle ,
241
+ TextHorizontalAlignment :: Center => parley:: Alignment :: Center ,
242
242
TextHorizontalAlignment :: Right => parley:: Alignment :: Right ,
243
243
} ,
244
244
parley:: AlignmentOptions :: default ( ) ,
@@ -315,7 +315,7 @@ impl Layout {
315
315
default_stroke_brush : Option < <R as GlyphRenderer >:: PlatformBrush > ,
316
316
draw_glyphs : & mut dyn FnMut (
317
317
& mut R ,
318
- & parley:: Font ,
318
+ & parley:: FontData ,
319
319
f32 ,
320
320
<R as GlyphRenderer >:: PlatformBrush ,
321
321
& mut dyn Iterator < Item = parley:: layout:: Glyph > ,
@@ -547,8 +547,8 @@ pub fn draw_text_input(
547
547
item_renderer. fill_rectangle (
548
548
PhysicalRect :: new (
549
549
PhysicalPoint :: from_lengths (
550
- PhysicalLength :: new ( rect. min_x ( ) as _ ) ,
551
- PhysicalLength :: new ( rect. min_y ( ) as _ ) + layout. y_offset ,
550
+ PhysicalLength :: new ( rect. x0 as _ ) ,
551
+ PhysicalLength :: new ( rect. y0 as _ ) + layout. y_offset ,
552
552
) ,
553
553
PhysicalSize :: new ( rect. width ( ) as _ , rect. height ( ) as _ ) ,
554
554
) ,
@@ -577,8 +577,8 @@ pub fn draw_text_input(
577
577
item_renderer. fill_rectangle (
578
578
PhysicalRect :: new (
579
579
PhysicalPoint :: from_lengths (
580
- PhysicalLength :: new ( rect. min_x ( ) as _ ) ,
581
- PhysicalLength :: new ( rect. min_y ( ) as _ ) + layout. y_offset ,
580
+ PhysicalLength :: new ( rect. x0 as _ ) ,
581
+ PhysicalLength :: new ( rect. y0 as _ ) + layout. y_offset ,
582
582
) ,
583
583
PhysicalSize :: new ( rect. width ( ) as _ , rect. height ( ) as _ ) ,
584
584
) ,
@@ -691,8 +691,8 @@ pub fn text_input_cursor_rect_for_byte_offset(
691
691
let rect = cursor. geometry ( & layout. inner , ( text_input. text_cursor_width ( ) ) . get ( ) ) ;
692
692
PhysicalRect :: new (
693
693
PhysicalPoint :: from_lengths (
694
- PhysicalLength :: new ( rect. min_x ( ) as _ ) ,
695
- PhysicalLength :: new ( rect. min_y ( ) as _ ) + layout. y_offset ,
694
+ PhysicalLength :: new ( rect. x0 as _ ) ,
695
+ PhysicalLength :: new ( rect. y0 as _ ) + layout. y_offset ,
696
696
) ,
697
697
PhysicalSize :: new ( rect. width ( ) as _ , rect. height ( ) as _ ) ,
698
698
) / scale_factor
0 commit comments