Move fonts-related code to a separate file.