Skip to content
Snippets Groups Projects
Commit ee29cae6 authored by StarArawn's avatar StarArawn
Browse files

Fixed missing layout stuff.

parent 737da2b6
No related branches found
No related tags found
No related merge requests found
......@@ -1900,6 +1900,8 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bevy",
"bytemuck",
"crevice",
"serde",
"serde_json",
"serde_path_to_error",
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment