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 committed 2022-06-11 20:58:52 +02:00
1 parent b9724f1e93
commit cc185bae4e
3 files changed
+23 -3

No files matched your search

+4 -1
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