Accessing windows fonts for a dynamic style sheet

Results 1 to 2 of 2

Thread: Accessing windows fonts for a dynamic style sheet

  1. #1
    Join Date
    Dec 1969

    Default Accessing windows fonts for a dynamic style sheet

    Hi I am creating a dynamic cascading style sheet for a project. It doesn&#039;t follow the example on this site but uses a database to store the values and then re-writes the .css file as needed. users can add or edit new styles as they want. I know this may not be the most efficient way of doing it but that doesn&#039;t really matter. The main problem is that I am looping through all of the fonts in the WINNTfonts directory and trying to populate a drop down menu with the font names. Unfortunately if you look at a font file rather than the name being the standard filename.tff or whatever the actual font file is named like that but to use the font I need the name that would define the font e.g. font-face="comic sans" this becomes comic.tff which doesn&#039;t work when selected. Can anyone think of a way of accessing the "real" name of the font so i can use it? <BR><BR>look at <BR>this is the page i am using. <BR><BR>Another problem you will notice is that the change of a style or creation is not instant. It takes a little while for the css file to update and so you need to keep re-freshing the page to get it to display. but on my server at home it is fine it works instantly. Any ideas on how to speed it up on the live server? <BR><BR>cheers <BR>Alan

  2. #2
    Join Date
    Dec 1969

    Default RE: Accessing windows fonts for a dynamic style sh

    Your font list seems quite small (20-30) unique font families; unless you will be adding/removing fonts often, I would simply create a static list and manage it as necessary.<BR><BR>Alternatively, you could easily create a COM component (yes, the ubiquitous COM) which enumerates the installed Windows font list.<BR><BR>-- Jim<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts