Tazerenix Posted January 8, 2010 Share Posted January 8, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/ Share on other sites More sharing options...
oni-kun Posted January 8, 2010 Share Posted January 8, 2010 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.. Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/#findComment-990794 Share on other sites More sharing options...
Tazerenix Posted January 8, 2010 Author Share Posted January 8, 2010 hmm alright, i'll check some javascript functions then Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/#findComment-990796 Share on other sites More sharing options...
oni-kun Posted January 8, 2010 Share Posted January 8, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/#findComment-990798 Share on other sites More sharing options...
Tazerenix Posted January 8, 2010 Author Share Posted January 8, 2010 well im only making the website in support for the latest browsers (chrome, IE8 and ff) so does it work in IE8 or chrome? Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/#findComment-990799 Share on other sites More sharing options...
oni-kun Posted January 8, 2010 Share Posted January 8, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/#findComment-990801 Share on other sites More sharing options...
Tazerenix Posted January 8, 2010 Author Share Posted January 8, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/187674-defining-font-via-url-in-php/#findComment-990803 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.