In-progress browser for a directory of text files
B = function(font)
--	print('B')
	-- recompute various aspects based on the current viewport settings
	for _,obj in ipairs(Surface) do
		if obj.type == 'line' then
			obj.zdata = {}
			for i=1,#obj.data,2 do
				table.insert(obj.zdata, vx(obj.data[i]))
				table.insert(obj.zdata, vy(obj.data[i+1]))
			end
		elseif obj.type == 'bezier' then
			zdata = {}
			for i=1,#obj.data,2 do
				table.insert(zdata, vx(obj.data[i]))
				table.insert(zdata, vy(obj.data[i+1]))
			end
			obj.zdata = love.math.newBezierCurve(zdata):render()
		elseif obj.type == 'text' then
			if obj.w then
				update_editor_box(obj, font)
				if font == nil and obj.editor then font = obj.editor.font end
			else
				obj.text = love.graphics.newText(love.graphics.getFont(), obj.data)
			end
		end
	end
end