diff --git a/src/fonts.rs b/src/fonts.rs index 07fd974..e976e27 100644 --- a/src/fonts.rs +++ b/src/fonts.rs @@ -176,7 +176,7 @@ impl Fonts { self.glyph_rasterizer .rasterize_glyph_run( &mut self.atlas, - &run, + run, PhysicalVector::new(horizontal_offset, 0.0), scale_factor, ) @@ -245,7 +245,7 @@ impl Fonts { for_each_glyph_run(&parley_layout, |run| { for rasterized in self.glyph_rasterizer.rasterize_glyph_run( &mut self.atlas, - &run, + run, PhysicalVector::zero(), scale_factor, ) { diff --git a/src/pob/api/rendering.rs b/src/pob/api/rendering.rs index 5c39591..b95ccb1 100644 --- a/src/pob/api/rendering.rs +++ b/src/pob/api/rendering.rs @@ -327,12 +327,12 @@ unsafe extern "C-unwind" fn draw_string(state: *mut ffi::lua_State) -> c_int { let halign = match alignment { PoBTextAlignment::Left => Alignment::Min, PoBTextAlignment::Center => { - position.x += screen_size.width as f32 / 2.0; + position.x += screen_size.width / 2.0; is_absolute_position = true; Alignment::Center } PoBTextAlignment::Right => { - position.x = screen_size.width as f32 - position.x; + position.x = screen_size.width - position.x; is_absolute_position = true; Alignment::Max }