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..

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.