Merge pull request #312 from polivanni/master

Reset width and leading of the reusable table TEXT_METRICS_OPTIONS by default
This commit is contained in:
Maksim Tuprikov 2025-05-20 00:50:09 +03:00 committed by GitHub
commit b5d2f313cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -473,6 +473,9 @@ function M.get_text_metrics_from_node(text_node)
options.tracking = gui.get_tracking(text_node) options.tracking = gui.get_tracking(text_node)
options.line_break = gui.get_line_break(text_node) options.line_break = gui.get_line_break(text_node)
options.width = 0
options.leading = 0
-- Gather other options only if it used in node -- Gather other options only if it used in node
if options.line_break then if options.line_break then
options.width = gui.get_size(text_node).x options.width = gui.get_size(text_node).x