This project is not covered by Drupal’s security advisory policy.


This module uses the @font-face feature of CSS to display texts using your favorite fonts. By doing this, you allow users to view texts in fonts not available on their computers. Those fonts are instead stored on the server. In Drupal, there are a few methods for doing this. Most (all ?) rely on javascripts or flash to generate flash objects or images representing the text. This module does not depend on either; so there are no flash objects, no images, just regular texts rendered beautifully in your favorite fonts.


To install, visit admin/settings/dfont. Basically, you have to upload fonts to Drupal's "files" directory and turn on the dfont filter.

Note: You have to provide *both* .ttf and .eot files (different extensions but having the same name) for each TrueType font so the text can be viewed across multiple browsers.


To use, you must first enable the Dynamic Font Filter (admin/settings/filters). You can use the filter in a number of ways. For examples:

   + [dfont=GentR102|16pt] text to be rendered nicely. [/dfont]
   + [dfont=df2|16pt] text to be rendered nicely. [/dfont]
   + [dfont=df2|120%] text to be rendered nicely. [/dfont]

In these example, GentR102 is the name of Gentium regular font, which also has a "short name": df2. See admin/settings/dfont for font names and their corresponding "short names". You can use either the full name or short name to specify the desirable font.

Note: The filter only styles one paragraph at a time; you must filter each paragraph separately. If you enclose the filter around multiple paragraphs, only the first paragraph is styled. A paragraph can have several lines separated by at most one return. If you separate two sentences with 2 or more returns, you have more than one paragraphs.

Where to get fonts?

You must provide both .ttf and .eot files for each fonts. There are many good free fonts, but due to potential (GPL) licensing issues I don't want to include them in the module. You can download them for free; e.g. here.

You can use this tool to convert those TrueType (ttf) fonts to OpenType (eot) fonts.

Project Information