Custom fonts support

Both `Detector` instance and `style` element will be created in this place already, so if we return, we've created some empty objects, please move this condition above variables initializers.