How to Edit a WOFF File

How to Edit a WOFF File

Maybe you want to rename a font, fix one letter, remove unused characters or change the spacing. WOFF files are packed for the web, so you cannot edit them in a text editor. You need a font tool. This guide shows you how to edit a WOFF file, step by step, with free tools.

Before you start: check the license

Fonts are software, and their licenses often limit changes. Some licenses, like the SIL Open Font License, let you change the font as long as you give it a new name. Others forbid any change at all. A few web font licenses even forbid converting the file.

Open the file in the free WOFF viewer and read the Copyright and License fields in Font information. If you are not sure, ask the font maker. Editing a font you do not have the right to change can get you into legal trouble, especially for commercial work.

What “editing a WOFF file” can mean

People mean different things when they say they want to edit a font. Here are the common jobs and the best tool for each.

What you want to doBest free tool
Change the shape of a letter or iconFontForge
Rename the fontFontForge or fontTools
Remove characters to make the file smallerfontTools (pyftsubset)
Change letter spacing or kerningFontForge
Add a new icon or letterFontForge
Change the format, like WOFF to TTFOpen WOFF File or fontTools
Change metadata like version or licenseFontForge or fontTools

Most of these jobs follow the same pattern. Open the WOFF file, make the change, then save it back out as WOFF, WOFF2 or TTF.

Step 1: Look at the font first

Before you edit anything, open the file in the viewer. Check three things:

  1. The glyph grid. Is the character you want to edit there?
  2. The glyph count. Is this the full font or a cut-down web version?
  3. The name and version. You will want to change these after editing.

If the file is a small slice of a bigger font, try to get the full version first. Editing a slice means your changes only cover a few characters. Our guide on why WOFF fonts show boxes explains how web fonts get sliced.

Try it: Open your WOFF file and check its glyphs before you edit.

Option 1: Edit a WOFF file in FontForge

FontForge is a free, open source font editor. It runs on Windows, Mac and Linux. It can open WOFF files directly, and recent builds also open WOFF2.

Open the file

  1. Download FontForge from its official website and install it.
  2. Open FontForge and choose File, then Open.
  3. Pick your WOFF file.

You will see a grid with every glyph in the font. Empty slots are characters the font does not have.

Edit a glyph

  1. Double-click a glyph to open it in the drawing window.
  2. Use the tools on the left to move points, add curves or draw new shapes.
  3. Close the window when you are done. Your changes stay in the font.

Drawing good letters takes practice. Small fixes, like moving one point, are easy. Designing new letters is a real skill.

Change the name

  1. Go to Element, then Font Info.
  2. Open PS Names and change Fontname, Family Name and Name For Humans.
  3. Open TTF Names and update the same names there too.
  4. Change the Version so you can tell your copy apart from the original.

If the font uses the SIL Open Font License and has a “Reserved Font Name”, you must change the name when you change the font.

Change spacing

Select a glyph and use Metrics, then Set Width to change how much space it takes. For kerning between pairs of letters, open Window, then New Metrics Window, and type the pair. Drag the letters closer or further apart.

Save the edited font

FontForge saves its own project format by default. To get a font file back, you must generate it.

  1. Go to File, then Generate Fonts.
  2. Pick the format from the list: TrueType for TTF, OpenType (CFF) for OTF, Web Open Font for WOFF, or WOFF2 if your build supports it.
  3. Choose a file name and click Generate.
  4. FontForge may show warnings about the font. Most are harmless. Read them in case one matters.

Then open the new file in the viewer to check that your changes are there.

Option 2: Edit a WOFF file with fontTools

fontTools is a free Python library. It is best for changes to font data rather than shapes. It is also great for editing many fonts at once.

Turn the font into readable text

The ttx command turns a font into an XML file you can edit in any text editor.

pip install fonttools brotli
ttx myfont.woff

This creates myfont.ttx. Open it and you will see each part of the font as text. The name table holds the names. The OS/2 table holds the weight and other settings.

Change something and rebuild

Edit the values you need, save the .ttx file, then build a font from it:

ttx --flavor woff2 myfont.ttx

Leave out the flavor option to build a plain TTF or OTF. Use woff for WOFF and woff2 for WOFF2.

Remove characters to make the font smaller

The pyftsubset tool, part of fontTools, keeps only the characters you choose. This is how websites make fonts smaller.

pyftsubset myfont.woff --unicodes="U+0020-007E" --flavor=woff2 --output-file=myfont-latin.woff2

That example keeps basic Latin letters, numbers and punctuation only.

Option 3: Paid font editors

Glyphs (Mac only) and FontLab (Windows and Mac) are professional font editors. They open WOFF and WOFF2 files and have far better drawing tools than FontForge. If you design fonts for a living, they are worth it. For a small fix, the free tools are enough.

What about online WOFF editors?

A few websites say they let you edit fonts online. Most of them only convert formats or change basic settings. Few let you edit glyph shapes properly. Many also upload your file to their server. For private or paid fonts, a desktop tool is safer.

Common editing jobs, explained

Making a web font smaller

Remove characters you do not use with pyftsubset, then save as WOFF2. A font that covers ten languages can often shrink by 70% or more if you only need English. Our guide on WOFF vs WOFF2 explains why WOFF2 is the best format for the result.

Turning a WOFF file into a font you can install

This is not really editing. Just convert it. Open the file in the viewer and click “Convert & download”. See how to convert WOFF to TTF for details.

Exporting one icon as an image

In FontForge, open the glyph and choose File, then Export. Pick SVG. You now have the icon as a vector image you can use anywhere. For more about icon fonts, read how to view icons in a WOFF file.

Fixing the font name shown in Word

Change the name fields in FontForge or fontTools, generate a TTF, and install it. Our guide on finding the font name in a WOFF2 file explains which fields apps read.

How to test your edited font

A font can look fine in the editor and still have problems in real use. Test it in three places before you ship it.

  1. In a viewer. Open the new file in the viewer. Check the name, the glyph count and the preview. Type the letters you changed and the ones around them.
  2. On a web page. If it is a web font, load it on a test page with @font-face. Look at it in Chrome, Firefox and Safari. Browsers check fonts before they use them and quietly reject broken ones.
  3. On your computer. Convert it to TTF, install it and type a paragraph in Word. Look for odd spacing, missing letters and wrong names in the font menu.

If something is off, go back to your editor, fix it and generate the font again. Keep each version with a new version number so you know which file is the latest.

Mistakes to avoid

  • Editing the only copy. Always keep the original file. Save your edits under a new name.
  • Keeping the old name. If two fonts share a name, apps get confused and may show the wrong one.
  • Forgetting to test. Open the edited file in a viewer and type real text before you use it.
  • Ignoring the license. Read it before you start, not after.

Common questions

Can I edit a WOFF file in Notepad?

No. WOFF files are compressed binary data. A text editor shows gibberish and will break the file if you save it.

Do I need to convert WOFF to TTF before editing?

No. FontForge and fontTools read WOFF directly. You can save the result in any format.

Can I edit WOFF2 files too?

Yes. fontTools handles WOFF2 when brotli is installed. Recent FontForge builds open WOFF2 as well. See how to open a WOFF2 file if you just want to look at one.

Summary

To edit a WOFF file, use FontForge for shapes, spacing and names, or fontTools for data changes and making fonts smaller. Check the license first, keep the original, rename your version, and test the result in a WOFF viewer before you use it.

Similar Posts

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *