SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    *********! *********!!! jackli's Avatar
    Join Date
    Sep 2005
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP to create font lister (on local machine)

    I tried using php to create a font lister on my local windows xp machine...

    ... by dragging c:/windows/fonts into a directory readable by my local web server ... so that i could use php to fetch each file name.

    even though the directory was on a different drive (drive j:/ ), some fonts were not copied but transferred-original(?). windows default and browser fonts went beserk.

    terrified, i re-dragged everything back.

    apparently some fonts did not transfer properly, and my browser title bar is now a permanent variant of webdings

    questions:

    1) other than breaking out .net, is there a way php can be used to dynamically create a font lister (without me having to manually populate the font names each time i install a new font)

    2) what happened to my titlebar font???

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Did a quick a test using scandir on C:\WINDOWS\Fonts and it returned all my fonts.

    PHP Code:
    <?php

    header
    ('content-type: text/plain');

    print_r(scandir('C:\WINDOWS\Fonts'));
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

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