the file is not displayed in the editor because it is either binary

Viewed 23

Added fonts in woff and woff2 format. Visual Studio Code writes, "The file is not displayed in the editor because it is either binary or uses an unsupported text encoding. Do you want to open it anyway?". I open the file and there are strange charactersexample of my code

1 Answers

Fonts are binary files that VS Code doesn't know how to open.

If you're trying to preview the font, both Windows and macOS have this built in. Right click on the font in the VS Code explorer and select "Reveal in File Explorer" or "Reveal in Finder", then double click the font file in the Explorer / Finder window that opens. It should open a preview.

If you want to edit the font you'll need an external program like FontForge.

Related