Added a try/catch because some text elements have the 'font' attribute.