Jump to content

Defining font via URL in PHP


Tazerenix

Recommended Posts

Hey, i think i saw a function that could do this a while ago. Is there a way you can define the font of a string via a url. Eg:

 

<?php
echo thefunction("Hello World!", "./fonts/times-new-roman.ttf");
?>

 

or something like that?

 

PHP is a server side language, Functions like that look like they'd exist in JS/PDF/Java..

hmm alright, i'll check some javascript functions then

 

What 'string' are you wanting to apply it to? GD is the only thing it could be applied to. If you're talking about a string on a web page, than the CSS function to import font from an url only works on FF3.5 and similar browsers.

well im only making the website in support for the latest browsers (chrome, IE8 and ff) so does it work in IE8 or chrome?

 

Look at this web page for the directive: https://developer.mozilla.org/index.php?title=En/CSS/%40font-face

 

But I believe only Firefox 3.5 allows this feature, I'm not 100% sure IE even would read it. You'd have to look up compatability for the @font-face. But yes, this is really more a CSS question.

 

EDIT: spec url

well im only making the website in support for the latest browsers (chrome, IE8 and ff) so does it work in IE8 or chrome?

 

Look at this web page for the directive: https://developer.mozilla.org/index.php?title=En/CSS/%40font-face

 

But I believe only Firefox 3.5 allows this feature, I'm not 100% sure IE even would read it. You'd have to look up compatability for the @font-face. But yes, this is really more a CSS question.

 

EDIT: spec url

 

alright, looks good

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.