Web developers such as myself find themselves struggling with a recent issue:
Convert system fonts to web usable font formats (EOT, WOFF, TTF, SVG).
There are a few good sites out there that will allow uploading a font and instantaneously get the necessary fonts and CSS styles to include on an existing website. Unfortunately, these sites may not work are expected:
- The fonts are not supported by the provider
- The fonts are generated but display poorly with defects
- The provider has blocked the conversion of the current font due to copyright issues
- Some browsers experience script errors while using specific font formats
- E.g. CSS3111: @font-face encountered unknown error. (EOT, Internet Explorer)
The objective of this post is to document the set up procedure in Windows, which can be very hard and error-phrone.
- Install Cygwin.
The latest x86/x64 binary DLL is fine.
Remember to pick a geographically near server and make sure you select additional packages to avoid later issues.
- Add wget
- Add gcc
- Add make
- Add GnuPG (gpg)
- Install Java and add the /bin folder to the Environment Variable "PATH"
- Install FontForge and add the /bin folder to the Environment Variable "PATH"
- Download the binary of Batik and extract it exactly in the below path to avoid issues
c:\Program Files\Batik\batik-1.7 (the last folder is included in the zip so you can "extract here" on the "Batik" folder withing "Program Files")
- Download sfnt2woff for Windows. Place it under Cygwin's bin folder.
- Download ttf2eot for Windows. Place it under Cygwin's bin folder.
- Add Cygwin's bin folder to the Environment Variable "PATH".
- Download CSS3FontGenerator and extract it over the Cygwin folder.
- Copy the desired font(s) to the same folder where you extracted the application in step 8.
- Finally, start Cygwin and run "./css3FontGenerator/convertFonts.sh *.TTF".
Online Web Font Generators: