Font Files to CSV File Generator

🚀 Developed a tool to process font files and generate a CSV file with font metadata! 🎨 This project creates images for each font, predicts the font family and style using a machine learning model, and exports the data to a structured CSV file for easy reference.

Project Objective

The goal of this project is to streamline font organization by automatically classifying fonts based on their visual characteristics and exporting the predictions to a CSV file. It simplifies font selection and categorization for designers and developers.

Steps Involved:

Data Preparation:

  • Scanned the specified folder for font files (e.g., .ttf, .otf).
  • Rendered sample images for each font using OpenCV and Pillow.
  • Prepared data for machine learning predictions.

Model Selection:

  • Utilized a TensorFlow-based model for font classification.
  • Predicted font family (e.g., serif, sans-serif) and tags (e.g., bold, italic, clarity, calligraphy).

Development:

  • Processed fonts and generated corresponding images.
  • Used Pandas to organize predictions into a structured CSV format.
  • Included font file links for easy reference.

Evaluation:

  • Tested model accuracy using a diverse set of fonts.
  • Ensured correct classification of font families and styles.
  • Validated CSV output for consistency and usability.

CSV Output:

The generated CSV file includes font names, predicted font families, associated tags, and direct links to font files for easy access.

Example Output (CSV):

Font Name Font Family Font Tags Font Link
Arial Sans-serif Regular Link
Times New Roman Serif Italic Link
Comic Sans Comic Bold, Clarity Link

Images from the Project



View the Code