Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

fonts in php

Recommended Posts

if make a folder fonts and get a good font how do i add the font to use it cheers.

eaxmaple

now how to get the font to be a working font cheers.
[code]
<?php

$fonts="fonts/";

$message="my name is redarrow";

$result=$message&$font;

echo $result;

?>
[/code]

Share this post


Link to post
Share on other sites
The browser, which is running on the user's PC, only has access to fonts on that user's PC. IF you want to display using fonts from the server you need to put the text in an image.

Share this post


Link to post
Share on other sites
can you kindly show me an example please and were to get the font from cheers.

Share this post


Link to post
Share on other sites
Well, the last time you asked me for an example was for a calendar script. When I had time (a couple of hours, and not the 10mins you believed) I wrote and then posted the script and sent you a PM to tell you it was there. As I never received any acknowledgement for my efforts, you are a liitle low on credit for my time.

Share this post


Link to post
Share on other sites
i didnt even know you sent the calender code thank you so much sorry about not responding thank you.

i have only looked now and cheers sorry for late reply cheers agin.

very cleaver code for the cal cheers grate.

Share this post


Link to post
Share on other sites
You can use [url=http://www.fontfreaks.com]FontFreaks[/url] and can find some nice free ttf fonts. I am sure that you already know how to use a font in an image, right?


Good luck,
Tom

Share this post


Link to post
Share on other sites
There are some posibilities in regard to embeding fonts in html, but really, this has nothing to do with php.

Share this post


Link to post
Share on other sites
you can 'force' the font to be downlaoded!

Now I tried this a while back and it only worked in IE at the time but some reading did indicate that other browsers would take it up.....

You will need to get the MS WEFT tool ([url=http://www.microsoft.com/typography/web/embedding/weft3/]http://www.microsoft.com/typography/web/embedding/weft3/[/url])

create an .eot file from teh font you need.

in your css put the following

@font-face { font-family: "New Font"; src: url(http://www.ursite.com/font/newfont.eot); }

New Font can be anything you want of course - you will define that....

NOW any text on your site that you wish to use that font on ( example here is a title header)
the html....

<h1 id="title">YOUR TITLE</h1>

the css...

h1#title { font-family: "New Font", Verdana, sans-serif; }

When a user visits the page and the don't have 'New Font' the page will display in the next font in the list BUT as soon as the font has been downloaded the page will refresh with your new font - and shoudl be cached for the next time they visit....

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.