Fixed many issues with text paragraphs in GUI

This commit is contained in:
Yousef Khadadeh 2026-04-25 19:01:19 +03:00
parent 2d039dc47b
commit eb490906a0
13 changed files with 132 additions and 37 deletions

View file

@ -76,7 +76,7 @@ void TextBoxCanvasComponent::set_data_from(const CanvasComponent& other) {
void TextBoxCanvasComponent::init_text_box(DrawingProgram& drawP) {
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);
textBox->set_max_width(d.p2.x() - d.p1.x() - TEXTBOX_PADDING * 2.0f);
}
void TextBoxCanvasComponent::draw(SkCanvas* canvas, const DrawData& drawData, const std::shared_ptr<void>& predrawData) const {