I am developing a content management system. In this, the formatting of the text must be done dynamically. I want to display a combo box with some font names by default and also the user may upload their font to server. The uploaded font name must be displayed in the combo box. The textbox content must be changed to the selected font.
I uploaded the font (TTF) files. The files are stored in server. The name of the font is added in combobox. I give the dummy code here.
Code:
document.getElementById("txtname").style.fontFamily='<?php echo $_POST["selfont"]; ?> ';
document.getElementById("txtname").value="<?php echo $data;?>";
When I select the font 'arial','times' , the text format is changed. Because these font are installed in client machine(windows\fonts).But when I select a new uploaded font ,how it is applied to textbox? Because the font is not installed in client machine.They are in server.What is the remedy for it?
Plz, help me.
Thanks in advance.


