simcoweb Posted September 4, 2006 Share Posted September 4, 2006 I'm in the process of creating a font display and download system but haven't any idea what is used for creating the realtime font examples where people type in some text in a form field and the text is displayed in the font they've chosen to sample. Here's a link to an example:[url=http://fontso.com/font-preview.php?f=99666]http://fontso.com/font-preview.php?f=99666[/url]Anyone have any idea what programming language this is done in? Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/ Share on other sites More sharing options...
Stevis2002 Posted September 4, 2006 Share Posted September 4, 2006 Wouldn't it be a case of having to install all of the fonts onto the server, and then using a dropdown in php or something to choose the font type, as the user selects it? Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/#findComment-85953 Share on other sites More sharing options...
AndyB Posted September 4, 2006 Share Posted September 4, 2006 The language is php using the GD library to generate images on demand.http://ca.php.net/manual/en/function.imagefttext.php - how to create texthttp://www.phpfreaks.com/tutorials/105/0.php - the phpfreaks tutorial Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/#findComment-85958 Share on other sites More sharing options...
simcoweb Posted September 4, 2006 Author Share Posted September 4, 2006 AndyB, but in that example url I posted it doesn't appear to be using an image. It appears to be a textarea type display. In the font listings where it has 'Sample Text' next to each one I would assume that's using the GD library method. But the dynamic display of a string of text typed by the visitor is something else i'm assuming? Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/#findComment-85960 Share on other sites More sharing options...
AndyB Posted September 4, 2006 Share Posted September 4, 2006 Page 2 of the tutorial shows an image - http://www.phpfreaks.com/tutorials/105/1.phpThe 'trick' is to have a simple form where the user selects a font and enters some short text and then pass the form entries to a script that retrieves the passed data, puts the font selected and the text string into the correct variable names and calls the image output. It's simple stuff once you get the hang of it. Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/#findComment-85967 Share on other sites More sharing options...
simcoweb Posted September 4, 2006 Author Share Posted September 4, 2006 Ok, cool. Just another note on that.. the sample url I pointed out...there's no submit button in the text field. The sample text being typed in just automatically displays in the large text area box. I can see it's an image now by right clicking on it (the displayed sample text). There must be some code that detects if the text field has anything present then goes ahead and displays it after a specific time delay. Any thoughts on that? Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/#findComment-85970 Share on other sites More sharing options...
AndyB Posted September 4, 2006 Share Posted September 4, 2006 view-source ... it's done with javascript and passes data to an image generator scriptlet Link to comment https://forums.phpfreaks.com/topic/19700-how-to-display-font-samples/#findComment-85978 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.