Skip to content

Instantly share code, notes, and snippets.

@mark05e
Last active November 15, 2024 14:24
Show Gist options
  • Save mark05e/706fbe6da38c40bbf308229e42a88bc3 to your computer and use it in GitHub Desktop.
Save mark05e/706fbe6da38c40bbf308229e42a88bc3 to your computer and use it in GitHub Desktop.

Extracting Custom Font Icons: A Step-by-Step Guide

Summary

This guide outlines the process of extracting custom font icons from a font file (EV-IVR--Script-Studio) using FontForge. With the assistance of Meta AI, we successfully extracted the required icons in SVG format.

Steps Taken

Step 1: Inspect Element and Identify Font Family

  • Inspected the HTML element containing the icon using browser developer tools.
  • Identified the custom font family (EV-IVR--Script-Studio) used for the icon.

Step 2: Extract CSS Styles and Font Files

  • Copied CSS styles related to the font family.
  • Downloaded font files (EV-IVR--Script-Studio.woff2, EV-IVR--Script-Studio.ttf, etc.).

Step 3: Download and Install FontForge

  • Downloaded FontForge, a free and open-source font editing software.
  • Installed FontForge on local machine.

Step 4: Open Font File and Identify Icons

  • Opened the font file (EV-IVR--Script-Studio) in FontForge.
  • Identified the required icons in the glyph table.

Step 5: Export Icons to SVG

  • Used FontForge's scripting feature to export glyphs to SVG.
  • Executed the following script:

FF

SelectWorthOutputting(); Export("C:/Temp/engage-icons/%n-%e.svg"); endloop;
  • Exported icons as SVG files.

Step 6: Convert SVG to PNG

Credit

Special thanks to:

  • Meta AI for providing guidance and support throughout this process.
  • FontForge for providing a powerful font editing software.
  • PineTools for offering a convenient bulk SVG conversion tool.

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment