tags:

views:

63

answers:

4

Hi.

I have developed a PHP project. In this I want to implement the font style in Wendy Medium. But I don’t know how I install this font in my server.

Does any one know how to do this?

Thanks in advance.

+6  A: 

You can use CSS 3 to use your own fonts on a HTML/PHP page. To do this, you have to make something like this:

@font-face {
  font-family: WendyMedium;
  src: url(‘path/to/your/font/file.ttf’);
}

You can use this font then with the folowing line of code:

p { font-family: WendyMedium, Arial, sans-serif; }

Note that this is only supported by real webbrowsers (Chrome, Safari, Firefox, etc). You also need the have a license to use that font on your website.

wgriffioen
Gotta love that "real webbrowsers" example. Leaving IE out of the box again! :D
Tom
+1 for correct answer, but -1 for "real webbrowsers". Dissing IE (and not mentioning workarounds to make things work in it as best as possible) has become almost as tiresome as IE's shortcomings themselves. [Here](http://stackoverflow.com/questions/3082835/css-font-face-not-working-in-ie) is a SO question on how to support IE as well
Pekka
+1  A: 

In addition to wgriffioen's answer: this website lets you generate a javascript that does something similar. It also works in IE7/8.

captaintokyo
+3  A: 

Just in case there’s any confusion, to use a font for a web page that you’ve generated via PHP, the font needs to be installed on the end-user’s machine, not your web server.

As mentioned in other answers, CSS3 provides a way for you to host the font file on your server (just like any other file), and reference it in the CSS, allowing the user’s browser to download it and render text on the page in that font.

However, as mentioned in Yi Yang’s comment, this often isn’t allowed by the font’s license. You’ll want to check whether and how this is allowed for Wendy Medium — perhaps see here: http://www.ascenderfonts.com/font/wendy-lp-family-3-fonts.aspx

Paul D. Waite
A: 

FontSquirrel probably does exactly what you want :) Works on most browsers too.

Litso