DejaVu Webfont Download

I wanted to use the DejaVu Sans Mono font for the new code boxes of the blog, because it was the default console font for many Linux distributions a while ago and still has a solid layout with very good functionality for coding purposes.

It turned out that it's unnecessarily hard to find the latest version of the font for a website. Some DejaVu packages out there have broken CSS files or missing .woff2 files and some are based on very old releases, just to name two problems I found.

So I decided to get the newest Font version 2.37 and convert all .ttf files to .woff and .woff2 and bundle it with the correct CSS information.

The archives contain everything you need for the usage in a website. IE >= 9 will be supported as well as any modern browser.

- *.woff
- *.woff2
- style.css

DejaVu Sans 2.37 WebfontDejaVuSans.zip
DejaVu Sans Mono 2.37 WebfontDejaVuSansMono.zip
DejaVu Serif 2.37 WebfontDejaVuSerif.zip

The License of the fonts can be found here. The font converting was done using the original .ttf files of font version 2.37 published here and a small Python script which does the job.

#!/usr/bin/env python3

# pip install fonttools[woff] brotli

from fontTools.ttLib import TTFont
import sys

f = TTFont(sys.argv[1])
n = sys.argv[1].split('.')

for i in ['woff2', 'woff']:
  f.flavor = i
  f.save(n[0] + '.' + i)

Schreibe einen Kommentar