bobinindia Posted July 1, 2008 Share Posted July 1, 2008 My host says the server has all the classic fonts installed. How do I get one into a variable? What would be the path? eg. $font = 'Verdana'; Any ideas? Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/ Share on other sites More sharing options...
DarkWater Posted July 1, 2008 Share Posted July 1, 2008 What are you using it for? Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579464 Share on other sites More sharing options...
ag3nt42 Posted July 1, 2008 Share Posted July 1, 2008 just use css in the variable keep her simple man $font="style='font-family:veranda;'"; if the font is installed on the server you don't need to do anything but call it with css.. granted keep in mind that not everyone has the font you have and thus it won't always work for them. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579465 Share on other sites More sharing options...
.josh Posted July 1, 2008 Share Posted July 1, 2008 As far as I know, there's no way to access those. Nor do your server's fonts really have anything to do with what's being displayed to the user in their browser. You specify the font with html or css. If the user has it on their computer, it will be rendered properly. If they do not, any number of unexpected things could happen. If your lucky, the browser will just default to arial or something. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579466 Share on other sites More sharing options...
DarkWater Posted July 1, 2008 Share Posted July 1, 2008 Unless he is talking about GD, which is why I asked. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579467 Share on other sites More sharing options...
.josh Posted July 1, 2008 Share Posted July 1, 2008 ah yeah, forgot about that. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579470 Share on other sites More sharing options...
bobinindia Posted July 1, 2008 Author Share Posted July 1, 2008 I am talking GD I need to create font previews on the fly as they include the text of the user. If i have an installed font in a folder on the server it is fine. My problem is getting the classic fonts as ttf files or accessing them from my server with the assumption that they are available. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579473 Share on other sites More sharing options...
ag3nt42 Posted July 1, 2008 Share Posted July 1, 2008 oh i can't help with that.. darkwater have to field this.. I never use GD.. barely know what it is Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579476 Share on other sites More sharing options...
.josh Posted July 1, 2008 Share Posted July 1, 2008 okay so if your host say they have all the classic fonts installed, ask them what the path is. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579479 Share on other sites More sharing options...
bobinindia Posted July 1, 2008 Author Share Posted July 1, 2008 I tried that and the two people I spoke to weren't very together!! I'm sure I'll do better in this forum! <?php $bbox = imagettfbbox($size,0,$font,$txt); //$font can be Verdana, Times New Roman, Comic Sans and Century. Very common fonts. ?> Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579483 Share on other sites More sharing options...
DarkWater Posted July 1, 2008 Share Posted July 1, 2008 The .tff files must already be in the Font path on the box, so just do what they said. o-O Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579486 Share on other sites More sharing options...
bobinindia Posted July 1, 2008 Author Share Posted July 1, 2008 I will call them again to see if I can get a better answer! Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579494 Share on other sites More sharing options...
bobinindia Posted July 1, 2008 Author Share Posted July 1, 2008 They really don't know their stuff. (My hosting company) I tried a few sites to download the ttf files but i can't find fonts like Verdana, Times New Roman, Comic Sans and Century. The only ones I need actually. Thousands of others are available. Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579555 Share on other sites More sharing options...
.josh Posted July 1, 2008 Share Posted July 1, 2008 so...you don't have those on your own computer already? Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579566 Share on other sites More sharing options...
bobinindia Posted July 1, 2008 Author Share Posted July 1, 2008 I have them and now i solved it by converting them to .dfont files. Thanks for everyones time Link to comment https://forums.phpfreaks.com/topic/112818-solved-calling-the-pre-installed-fonts-from-server/#findComment-579576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.