About Web Font Generator
A web font generator saves you the fiddly part of self-hosting a font. Upload a TTF or OTF file and you get one ZIP with the font as WOFF2, WOFF and TTF, plus a CSS file with the @font-face rule already written. Put the files on your site, paste the CSS into your stylesheet, and the font is ready to use.
Choose the font-display value for the rule. The recommended swap shows text right away in a fallback font and switches to yours once it has loaded, while auto, block, fallback and optional handle that moment differently. Tick Embed the font in the CSS (Base64) to put the font data inside the CSS itself, which saves a request but makes the stylesheet bigger.
How to use Web Font Generator
- 1Upload a TTF or OTF
Choose or drop the font you want to use on your website.
- 2Choose font-display
Pick a value from the list. swap is the recommended choice for most sites.
- 3Decide on Base64
Tick Embed the font in the CSS (Base64) if you want one CSS file with the font inside.
- 4Confirm and generate
Tick the licence box, click Web Font Generator and download the ZIP.
Why use Cubfile for this
- Three formats, one ZIP
WOFF2, WOFF and TTF versions of your font, packed together.
- Ready-to-paste CSS
The @font-face rule is written for you, with the paths to the font files.
- font-display control
Choose swap, auto, block, fallback or optional.
- Optional Base64 embedding
Put the font straight into the CSS, handy for small fonts and icon fonts.