1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2025-06-30 23:20:43 +02:00

Fix default font chosing when multiple fonts

This commit is contained in:
Pierre-Yves Rollo
2018-07-16 10:18:08 +02:00
parent fac6dfe1f8
commit 4b02cfdfca
3 changed files with 15 additions and 2 deletions

View File

@ -44,7 +44,8 @@ function font_api.on_display_update(pos, objref)
if entity and ndef.display_entities[entity.name] then
local def = ndef.display_entities[entity.name]
local font = font_api.get_font(meta:get_string("font") or def.font_name)
local font = font_api.get_font(meta:get_string("font") ~= ""
and meta:get_string("font") or def.font_name)
local maxlines = def.maxlines or 1 -- TODO:How to do w/o maxlines ?