Embedded fonts toggle: disabled if no embedded font

Have the enabled/disabled state of the toggle show the
presence or not of embedded fonts in the current book.
Also show the names of the embedded fonts in the
help_text InfoMessage.
This commit is contained in:
poire-z
2022-06-11 11:08:42 +02:00
parent b9724f1e93
commit cc185bae4e
3 changed files with 23 additions and 3 deletions

View File

@@ -101,7 +101,10 @@ function optionsutil.showValues(configurable, option, prefix, document)
end
if option.help_text_func then
-- Allow for concatenating a dynamic help_text_func to a static help_text
help_text = T("%1\n%2\n", help_text, option.help_text_func(configurable, document))
local more_text = option.help_text_func(configurable, document)
if more_text and more_text ~= "" then
help_text = T("%1\n%2\n", help_text, more_text)
end
end
local text
local name_text = option.name_text_func