fix: text_width() ignoring global font_bold option

This commit is contained in:
tomasklaen
2022-10-31 09:24:12 +01:00
parent 972dd41b94
commit d9e5853542

View File

@@ -324,7 +324,7 @@ function text_width(text, opts)
if not text or text == '' then return 0 end
---@type boolean, boolean
local bold, italic = opts.bold or false, opts.italic or false
local bold, italic = opts.bold or options.font_bold, opts.italic or false
if options.text_width_estimation then
---@type {[string|number]: {[1]: number, [2]: integer}}