~akkartik/luaML.love

f1de276ce8f1ace49880b3ca3371e2b3d3299c5d — Kartik K. Agaram a month ago b32a605
bugfix: don't recreate font unnecessarily in B
1 files changed, 3 insertions(+), 3 deletions(-)

M 0019-B
M 0019-B => 0019-B +3 -3
@@ 1,6 1,6 @@
B = function()
	-- recompute various aspects based on the current viewport settings
	local font = nil
	local font = nil  -- ensure a single font object over the whole surface
	for _,obj in ipairs(Surface) do
		if obj.type == 'line' then
			obj.zdata = {}


@@ 17,11 17,11 @@ B = function()
			obj.zdata = love.math.newBezierCurve(zdata):render()
		elseif obj.type == 'text' then
			if obj.w then
				update_editor_box(obj, font)
				update_editor_box(obj, font or obj.editor.font)
				if obj.editor and obj.editor.font then font = obj.editor.font end
			else
				obj.text = love.graphics.newText(love.graphics.getFont(), obj.data)
			end
		end
	end
end
end
\ No newline at end of file