Clearly from the error can be read that the current index you are using for the array doesn’t exist.
$up_fonts[$font]['style']
is not set.
You haven’t defined your array enough. Check if the value exist with
if (isset($up_fonts[$font]['style'])):
$stylesheet = $up_fonts[$font]['style'];
endif;
2
solved How to defined a variable on PHP? [closed]