View contents of a .woff2 font file
Asked Answered
M

4

18

I'm trying to make sure that the .woff2 font file contains the same set of glyphs as one of my .ttf files. So, it would be really nice to view them somehow side by side, but I can not find any tool that makes the viewing of .woff2 file possible on Mac OS.

Could some of you more experienced people point me to one? Or maybe you know a better way of comparing two font files on a Mac?

Marsipobranch answered 5/9, 2017 at 16:20 Comment(0)
M
5

So, In the end I have not found any options to view the .woff file. To somebody struggling with this, here's what I did:

  1. Convert the woff font to ttf with one of the converters available online.
  2. Open the ttf file with your system default font viewer (FontBook on Mac), or one of the available for download (i.e. FontForge, FontExplorer X).

This probably is prone to errors during the conversion phase, but it's better than nothing.

Marsipobranch answered 13/9, 2017 at 8:47 Comment(0)
O
9

FontForge can open .woff2 Font files.
It's available for Windows, MacOS and Linux.

I my case it can open the Angular Material Icon Font so i can check which Icons are available within my Version of the File.
To get better performance you can Encoding > Compact (hide unused glyphs) within the Menu.

Outcross answered 6/12, 2022 at 16:30 Comment(2)
Scanning results in virustotal for this executable virustotal.com/gui/file/…Curren
@Curren Be aware that only the version you downloaded lead to your results. Every newer version of FontForge a least should be checked once again. If someone downloads it through some third party or unsecure network basically every file (executable) should be check. Thanks for making people aware to scanning executables via virustotal.Outcross
T
7

I was searching for something like this and I found FontTools: https://github.com/fonttools/fonttools

You can install it with Python's pip package manager:

pip install fonttools[ufo,lxml,woff,unicode]

Once installed, you may want to use the fonttools ttx command to extract the Glyphs table from both your fonts and them further compare the generated .ttx files:

fonttools ttx -t GSUB --flavor woff2 -o woff2.ttx some-font.woff2
fonttools ttx -t GSUB -o ttf.ttx some-font.ttf
diff woff2.ttx ttf.ttx
Theravada answered 4/6, 2020 at 23:28 Comment(1)
Nice tip. I find the "GlyphOrder" table a little easier to process. fonttools ttx -t GlyphOrder --flavor woff2 -o glyphs.xml my.woff2Parotid
D
6

I came across this powerful online tool FontDrop.

  • It supports viewing of both .woff and .woff2 file formats.
  • Has a variety of features like showing the glyphs, ligatures and other detailed metadata as well.
Diantha answered 16/1 at 19:18 Comment(1)
Ah, glad to hear they've added support for woff2. It was still missing in ~2022 – probably mainly because fontdrop is based on opentype.js which decided to not include "onboard" woff2 as it would require to add a quite complex brotli decompression algorithm to the core – I thing a rather questionable design decision.Alanis
M
5

So, In the end I have not found any options to view the .woff file. To somebody struggling with this, here's what I did:

  1. Convert the woff font to ttf with one of the converters available online.
  2. Open the ttf file with your system default font viewer (FontBook on Mac), or one of the available for download (i.e. FontForge, FontExplorer X).

This probably is prone to errors during the conversion phase, but it's better than nothing.

Marsipobranch answered 13/9, 2017 at 8:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.