diff --git a/Cargo.lock b/Cargo.lock index 91cc95ecef83d8f44bf15749d14e39b793495a37..13791313ef63285cc513593ab15d7aa884fba41d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1900,6 +1900,8 @@ version = "0.1.0" dependencies = [ "anyhow", "bevy", + "bytemuck", + "crevice", "serde", "serde_json", "serde_path_to_error", diff --git a/bevy_kayak_ui/src/render/unified/font/extract.rs b/bevy_kayak_ui/src/render/unified/font/extract.rs index c4d7fbec89b1ee118d179263239c8c231bc155b5..3e609e616e0513e85ce25475b5f37d2424ab23ec 100644 --- a/bevy_kayak_ui/src/render/unified/font/extract.rs +++ b/bevy_kayak_ui/src/render/unified/font/extract.rs @@ -4,7 +4,7 @@ use bevy::{ sprite2::Rect, }; use kayak_core::render_primitive::RenderPrimitive; -use kayak_font::KayakFont; +use kayak_font::{CoordinateSystem, KayakFont}; use crate::{ render::unified::pipeline::{ExtractQuadBundle, ExtractedQuad, UIQuadType}, @@ -52,8 +52,12 @@ pub fn extract_texts( let font = font.unwrap(); - let chars_layouts = - font.get_layout(Vec2::new(layout.posx, layout.posy), content, font_size); + let chars_layouts = font.get_layout( + CoordinateSystem::PositiveYDown, + Vec2::new(layout.posx, layout.posy), + content, + font_size, + ); for char_layout in chars_layouts { extracted_texts.push(ExtractQuadBundle {