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? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted July 1, 2008 Share Posted July 1, 2008 What are you using it for? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
.josh Posted July 1, 2008 Share Posted July 1, 2008 ah yeah, forgot about that. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. ?> Quote Link to comment 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 Quote Link to comment 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! Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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.