Use FontData everywhere

This commit is contained in:
Yousef Khadadeh 2025-11-16 10:42:01 +03:00
parent 4fe52ef7f6
commit a99b0e920d
14 changed files with 51 additions and 46 deletions

View file

@ -61,7 +61,7 @@ void DrawTextBox::update_from_delayed_ptr(const std::shared_ptr<DrawComponent>&
}
void DrawTextBox::init_text_box(DrawingProgram& drawP) {
textBox->set_font_collection(drawP.world.main.fonts.collection); // Getting a segfault relating to the paragraph cache means that the font collection hasn't been set yet
textBox->set_font_data(drawP.world.main.fonts); // Getting a segfault relating to the paragraph cache means that the font collection hasn't been set yet
textBox->set_width(d.p2.x() - d.p1.x() - TEXTBOX_PADDING * 2.0f);
}