From ae8d107c6540db80e9de0bcaffd159f90b4f2175 Mon Sep 17 00:00:00 2001 From: Subhraman Sarkar Date: Wed, 28 Aug 2024 17:11:15 +0530 Subject: [PATCH] add default font size to canvas --- src/gui/core/canvas.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gui/core/canvas.cpp b/src/gui/core/canvas.cpp index 6d6843218b7..78e715321c4 100644 --- a/src/gui/core/canvas.cpp +++ b/src/gui/core/canvas.cpp @@ -417,7 +417,7 @@ text_shape::text_shape(const config& cfg, wfl::action_function_symbol_table& fun : rect_bounded_shape(cfg) , cfg_(cfg) , font_family_(font::str_to_family_class(cfg["font_family"])) - , font_size_(cfg["font_size"]) + , font_size_(cfg["font_size"], font::SIZE_NORMAL) , font_style_(decode_font_style(cfg["font_style"])) , text_alignment_(cfg["text_alignment"]) , color_(cfg["color"]) @@ -438,11 +438,6 @@ text_shape::text_shape(const config& cfg, wfl::action_function_symbol_table& fun , outline_(cfg["outline"], false) , actions_formula_(cfg["actions"], &functions) { - - if(!font_size_.has_formula()) { - VALIDATE(font_size_(), _("Text has a font size of 0.")); - } - const std::string& debug = (cfg["debug"]); if(!debug.empty()) { DBG_GUI_P << "Text: found debug message '" << debug << "'.";