Porl123 Posted September 27, 2009 Share Posted September 27, 2009 I wasn't really sure whether this was php or html but I was wondering how about fonts. When you use a font with font-family: or font face="" it only lets the user see the font if they have the specific font in their fonts folder. I was just wondering if there was a way of uploading a font to your web space and linking it to a file so others can see it. If I'm way off please tell me thanks Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/ Share on other sites More sharing options...
RussellReal Posted September 27, 2009 Share Posted September 27, 2009 Nope Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925825 Share on other sites More sharing options...
Daniel0 Posted September 27, 2009 Share Posted September 27, 2009 Nope That's not entirely true. CSS3 has something called @font-face. Example: @font-face { font-family: foo; src: url(foo.ttf); } p { font-family: foo; } It's not very widely supported though. It works in FF, however. There is also sIFR and Cufón. Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925828 Share on other sites More sharing options...
RichardRotterdam Posted September 27, 2009 Share Posted September 27, 2009 Ah I was going to mention sIFR but Daniel beat me to it. Additionally to that you could use PHP for creating an image out of a font. Think of how a lot of captcha scripts work, these often use a custom font for outputting an image. Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925831 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 you can get the font you want, and put it in a folder , then use gd to show that font on the user's page.... well i think gd works that way (anyone correct me...? Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925978 Share on other sites More sharing options...
Alex Posted September 27, 2009 Share Posted September 27, 2009 you can get the font you want, and put it in a folder , then use gd to show that font on the user's page.... well i think gd works that way (anyone correct me...? Through PHP GD you can load fonts and use them in images, but not on a website's text. Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925980 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 So i am guess, into today's world, users let a font download, via ajax ,to client's pc to let them see the font then? don't no..... there no other way then gd on a image, or font downloaded, i think i am right tell me..... Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925985 Share on other sites More sharing options...
Daniel0 Posted September 27, 2009 Share Posted September 27, 2009 i think i am right tell me..... You could also just read the entire topic before posting. Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925992 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 arrrrr so css3 use the font-face (url) ok......... to many incompatibility problems... but must admit css getting like JavaScript it self well advance... Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-925995 Share on other sites More sharing options...
.josh Posted September 27, 2009 Share Posted September 27, 2009 If you have the font on your server, you can use it to write text to an image with the GD library, yes. By the time it gets to the user, it's an image, not text. IMO the best thing you can do if you wish to use the font on your site, is to offer a link to the user to download and install the font. In your css, offer multiple font choices so the browser can fall back to alternatives if the user doesn't have it installed, of course. Quote Link to comment https://forums.phpfreaks.com/topic/175692-fonts/#findComment-926058 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.