renderer fonts: additions and improvements
* Allow passing font options to renderer.font:copy(). * Added renderer.font:get_path() * Reintroduced set_size() for more faster font size changes * Swapped copy wiht set_size on scale plugin for better performance * Use code_font:copy() instead of renderer.font.load() on language_md to properly match user font now that font options are supported on copy. * Added new changes to renderer docs
This commit is contained in:
@@ -14,9 +14,7 @@ for _, attr in pairs({"bold", "italic", "bold_italic"}) do
|
||||
attributes["bold"] = true
|
||||
attributes["italic"] = true
|
||||
end
|
||||
-- no way to copy user custom font with additional attributes :(
|
||||
style.syntax_fonts["markdown_"..attr] = renderer.font.load(
|
||||
DATADIR .. "/fonts/JetBrainsMono-Regular.ttf",
|
||||
style.syntax_fonts["markdown_"..attr] = style.code_font:copy(
|
||||
style.code_font:get_size(),
|
||||
attributes
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user