Jump to content

fonts in php


redarrow

Recommended Posts

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.
Link to comment
https://forums.phpfreaks.com/topic/17881-fonts-in-php/#findComment-76433
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....

Link to comment
https://forums.phpfreaks.com/topic/17881-fonts-in-php/#findComment-76516
Share on other sites

Archived

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

×
×
  • Create New...

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.