hello

kindly explain me , how to use dfont. i want to use nonstandard font ( its urdu unicode font) for my website. can i do this on drupal?

thank u

Comments

joecanti’s picture

Hi,
You have to put the ttf and eot versions of the font into sites/default/files/fonts. Then you can implement in a number of ways. I find the easiest is to add it into the css file.

EG you have a font called bigfont01. its probably in .ttf format so use the converter linked from the mod homepage to convert to an .eot. now place both the .ttf and the .eot files into a new directory called fonts - at the above location. To check all is well now go to admin/settings/dfont and click generate fontstyles at the bottom to see your new loaded fonts.

Now in your theme's css file add the font-family line to the relevant bit of the file.

p {
font-family: bigfont01
font-size: 16px;
}

This will make all the p text into your new font and size 16px.

or

h1 {
font-family: bigfont01
font-weight:bold;
}

This will make all your header 1 text ito your new font and make it bold.

Be warned though it only works in some browsers. For a different solution check out textimage or signwriter - they will probably work across more browsers but they turn the text to images, making your web pages larger, your text unable to be resized and reducing your seo visability.

joe