i want to use this font i made at this one website called fontstruct.
and i found the css code its:

<style>@font-face {
  font-family: "italic";
  src: url(http://www.socialemo.com/font/small.ttf) format("truetype");
}
h1 { font-family: "italic", sans-serif;text-decoration:italic;}
</style>

it says it works but it doesnt. please help

Skank,

Suggestions:

  1. There's a reasonable chance that @font-face is not supported by your browser.
  2. Avoid naming your font "italic".
  3. text-decoration:italic; will have no effect. "italic is not a valid option for text-decoration".
  4. Are you sure that you created a truetype font?

Airshow

yeah i took all that out im using firefox i dont know whats wrong with it. its a ttf font

Skank,

From what I read, supported from Firefox 3.1 (beta). Currently at release 3.0.10 .

Airshow

oh so font is not world browser supps?

Custom fonts are not supported currently by enough browsers to be a useable method. The only real way to create your own fonts is to either have a PHP script write an image with a font, or get an application like Flash to write your font.

oh thats too bad. browsers should support this! noone likes it when their site doesnt look the same to someone else because they dont have a font installed and their default font on their browser is of horrible size compared to what the website is supposed to looks like. : [[[

Hehe, I did something similar on another forum with greasemonkey and PHP so that when I submitted a post, GM would take my text and change it to an image script on my site, like this: <img src="http://www.example.com/post.php?text=MY_TEXT_HERE" alt="MY_TEXT_HERE"/> All of my posts had a cool font :P

Sneaky or what!? Must have left a lot of people guessing.

Airshow

cool im not going to do custom fonts anytime soon

Remember that the browser looks at the fonts installed on the USER'S computer, not your host. The user would have to voluntarily install your font for the browser to be able to use it.

Your best option, if you must use a nonstandard font, is to use MSPaint to stick it into an image file, and then display that.

Remember that the browser looks at the fonts installed on the USER'S computer, not your host. The user would have to voluntarily install your font for the browser to be able to use it.

Your best option, if you must use a nonstandard font, is to use MSPaint to stick it into an image file, and then display that.

how do u stick fonts to image fies?

He was saying to literally make each and every image with text that is in a certain font. Microsoft Paint should let you change the font by default when you use the Text Tool.

Remember that the browser looks at the fonts installed on the USER'S computer, not your host. The user would have to voluntarily install your font for the browser to be able to use it.

Your best option, if you must use a nonstandard font, is to use MSPaint to stick it into an image file, and then display that.

That's certainly true of CSS2 font but Skank was wanting to use a custom font (ie. one not necessarily installed on the client).

His hope was that CSS3 @font-face would do the trick but was advised that @font-face, whilst being functionally correct for the job, is not yet widely enough implemented to be considered mainstream. It should therefore not yet be used in general internet pages.

As you point out, you can indeed serve an image created in photoshop/paintshop/MSpaint, containing text in any font available to you as a designer (I've done it and I'm sure many other have before and since). The drawback here is that image creation is a manual process and therefore not particularly responsive to web pages in which the content changes.

Itsjareds provided a link to two very interesting techniques, which, whilst inefficient, will achieve a custom font effect by replacement of text (designated by standard HTML markup) with dynamically generated images.

I think those are all the important points and hope I haven't mis-represented anybody's good words.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.