How can I get a font's filename from the font's name?

Hello all. I'm trying to copy a font from C:\WINDOWS\Fonts to another directory, but it's not always possible. To copy it I need the font's filename but, through Javascript, I can only get its name (not to confuse with the file name), family or PostScript name. For instance, "OCR A Extended"'s filename is "OCRAEXT.TTF", but I couldn't find a way to resolve the second name from the first (and tried a lot of things).
My first workaround has been opening a File.openDialog when the font's name and filename do not match, so the user goes to "WINDOWS\Fonts" and selects the file, but this directory is a bit tricky and will never accept the selection. However, if the font is any other directory that "Fonts", the file can be selected without problems.
I can figure some ways to solve this (for instance, asking the user to get the filename by himself and type it in a text box) but I'd rather ask here just in case there's an easy way I couldn't find out in the manual neither in the forums.
Many thanks in advance

I have managed to get a file with a complete list of fonts with thier filenames using vbs
It creates Fontlist.txt on the desktop, you could even call the script from the jsx and read the values in once the file has been created.
Set wshShell = WScript.CreateObject("WScript.Shell")
Set wshSysEnv = wshShell.Environment("PROCESS")
sMyFile = "c:" & wshSysEnv("HOMEPATH") & "\Desktop\Fontlist.txt"
Dim objFileSystem, objOutputFile
Dim strOutputFile
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(sMyFile, TRUE)
Dim str
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Fonts"
objReg.EnumValues HKEY_LOCAL_MACHINE, _
strKeyPath,arrEntryNames,arrEntryZZZ
For Each entry in arrEntryNames
str = wshshell.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts\" & entry)
       objOutputFile.WriteLine(entry & "," & str)
Next
objOutputFile.Close

Similar Messages

  • My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    My iPhone is stolen. How can I get my address book back from the iCloud? I should have synchronized my iPad address book. However, I loss some recent contacts from iPhone.

    I use my iPad to get the address book backed up by iCloud from my iPhone. However, I cannot see the recent new contacts from my iPad. Is there anyway to check the iCloud server to see if my address book backup from my iPhone is still there?

  • How can I get my Aperture library back from the Photos application?

    As stated above, How can I get my Aperture library back from the Photos application?  I'm not a fan of Photos right now and haven't used iPhoto in years, so that wasn't a loss... I didn't realize when I gave Photo's access to my Aperture library, I was going to lose it...
    I want to get it back, any suggestions?
    Thanks again!
    MacTeacherMN

    what means ..."Once you open the Aperture library back into Aperture..."? What do I need to "klick" in order to getting back my old Aperture Project structure....

  • How can I get help for ADE downloads from the public library.   I am suddenly getting error messages

    How can I get help for ADE downloads from the public library.  It worked for years and now I am getting error messages.   I cannot find any practical help

    If you are trying to open the book on a device, try using the latest DL Reader on Android and iOS
    https://play.google.com/store/apps/details?id=com.datalogics.dlreader&hl=en

  • HT201272 How can I get my old ringtones back from the iTunes Store?

    How can I get my ringtones back?

    Ringtones are a one-time only download from the store. Do you have copies of them in the Tones part of your computer's iTunes library and/or on your backup of your downloads ? If not, and if they are still in your country's store, then you could try contacting iTunes Support and see if they will grant you a redownload : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • How can I get Bookmarks Toolbar to go from the bottom of list to top?

    Just reinstalled 27 after a crash of my PC. I imported my bookmarks from my HTML, but can't get the Bookmarks Toolbar to go back to the top of the list of bookmarks, above Bookmarks Menu.
    Also, how do I get the bookmarks from my Bookmarks Toolbar folder to display at the top of my screen again? Thank you!-Liz

    Your reply didn't answer my question, Deb, but it did give me some other info I needed. Thank you for taking the time to reply.

  • How can I get rec'd text messages from the same subscriber not be appended

    Hi,
    Is there a way to configure the Apple iphone so that text messages from the same subscriber are displayed separately rather than appended to each other? In this way accidentally deleting one message wouldn't delete the entire history of messages from this subscriber.
    When I launch the SMS service by pressing the green SMS button I am met by a screen that says Text Messages. On the left of this there is a button that says Edit and on the right there is one that is for writing a new message. Down the page are my messages all grouped by the originator of each messages. If I choose one I see that all messages from this source are present appended one after the other. There is also the option now to Clear on the top right hand corner. It is this Clear option I am worried about. If I choose Clear I am asked for a confirmation and then lo and behold as expected all my messages from this subscriber are deleted.
    This is a work phone for support purposes and most of the texts will be from the telephone operator (i.e. the one same number) saying we have an email waiting to be read with a subject title giving a little description. I want to be in a position so that I don't accidentally delete the entire history of messages, say some evening when I'm tired or Monday morning if I 'm a bit asleep. Ideally I would prefer that each text message would stand alone in the Text Messages window irrespective of the originator and not be appended in a group fashion. Is there a way to do this?
    Kind regards,
    M

    There is no way to do that on the iPhone. Messages will always be grouped into a 'conversation' based on the sender/recipient. Only Apple can change that behavior.
    You can submit feedback to Apple: http://www.apple.com/feedback/iphone.html.

  • How can I get my printer to not change the font from any larger number than 10

    Is the problem in the printer or in the computer, I have a Dell windows 7

    I understand that you are finding issues while printing certain fonts with font size >10
    Please try to provide more details about the application software used, printer model and additional information which might help to understand the issue better.
    In general, the application software controls the complete page formatting (page layout, text/font size etc.).  Information or print commands sent by software will override the certain print driver settings and driver will convert the job to printable data.
    Please mark the post that solves your problem as Accepted Solution
    Click the 'Kudos Thumbs Up' if this was helpful. Thank You!
    (Although I am an HP employee, I am speaking for myself and not for HP)

  • How can I get dataTable to display values from the java layer?

    When I use the dataTAble in my JSP page it will only display values from my java layer if the facets tag has it's name set to "header". Why is this happening?
    If I set it to "header" and I look at the page source it actually has created the correct number of rows but it doesn't put the values between the <td> tags? It see's the length of my list but it doesn't pick the values out of the list.
    <h:dataTable var="data" value="#{NameBean.test}" border="1">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    </h:column>
    <h:column>
    <f:facet name="header">
    <!-- <h:outputFormat styleClass="outputFormat" id="format1" value="#{NameBean.test}"></h:outputFormat>-->
    <h:outputText styleClass="outputText" value="#{NameBean.test}" style="" rendered="true" escape="false"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    public List gettest()
              List li = new LinkedList();
              Object Developers[] = {"M@n00j", "sdsadas"};
              for( int i = 0; i < Developers.length; i++ )
                   li.add(Developers);
              return li;
    Thanks in advance to anyone that can help.
    -ls6v

    I've been able to get it working with some of those changes along with changes in the JSP. I think it's a setting or two in the JSP that'll allow the program to run correctly.
    I have a list and it's returned like what you suggested. A day or two ago I tried to move the outputtext outside of the facet tag but nothing would print, I know believe that's related to the following setting in the JSP:
    rows="0" in the <h:dataTAble tag
    Unfortunately the dataTAble isn't displaying the values correctly. It prints all of the values (Strings) in the list on each row and it make a new row for the number of items in the list.......... ???
    Here's what it's printing to the screen (the table):
    ===================
    == [asdasd], [sddfdfd] ==
    ===================
    ===================
    == [asdasd], [sddfdfd]==
    ===================
    what it should print:
    ============
    == [asdasd] ==
    ============
    ============
    == [sddfdfd] ==
    ============
    My code:
    public List gettest()
              List li = new ArrayList();
              li.add("asdasd");
              li.add("affffd");
              return li;
              }JSP
    <h:dataTable border="1" columnClasses="list-column-left"
        headerClass="list-header"
        rowClasses="list-row-odd"
        id="table"
        rows="0"
        value="#{NameBean.test}"
        var="data">
    <h:column>
    <f:facet name="header">
    <h:outputText value="test"/>
    </f:facet>
    <h:outputText value="#{NameBean.test}" style="" rendered="true" escape="false"/>
    </h:column>
    </h:dataTable>

  • How can i get a new iPod touch from the warranty it has if i lost it?

    i have lost my ipod touch 5g, but i do have warranty. i just dont know how to do it online.

    You posted in the iPad forum instead of the iPod forum. To get answers to your question, next time post in the proper forum. See https://discussions.apple.com/index.jspa  I'll request that Apple relocate your post.
     Cheers, Tom

  • How can I get my iPod touch unfrozen from the apple logo?

    My iPod is frozen won't respond. I've plugged it into the computer, but it won't even recognize the device in iTunes. What do I do?

    Also, See Here for
    Frozen or unresponsive iPod touch

  • HOW CAN I GET A DESCRIPTION OF ALL OF THE FRATURES IN lION 10.7.4

    How can I get a description of all of the programs that came with my mac pro without spending an arm and a leg?

    This is a good place to start and follow the links to all the Mac 101 articles.
    http://www.apple.com/support/mac101/
    Regards,
    Captfred

  • One laptop died.  I have a new laptop now.  How can I get my Ipod song list on the new laptop without downloading each c.d.?

    My first laptop died.  I have a new laptop now.  How can I get my Ipod song list on the new laptop without downloading each c.d.?

    See this older post from another forum member Zevoneer covering the different ways to copy content from your iPod to your PC.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • How can I get rid of multiple pictures at the same time?

    how can I get rid of multiple pictures at the same time?

    Adobe Bridge, lightroom and your file browser (windows explorer or Mac Finder) can select multiple pictures at once and then delete. If you are looking for more than that for information, you will need to be more specific at what your doing, what OS you have, and version of software your using. If necessary post screen shots so we can see what your doing. The more information we have the more detailed of an explaination can can give back to you.

  • When I try using Airplay to stream from Amazon Prime it tries to use Apple TV music.  How can I get it it stream movies from Amazon Prime?

    When I try using Airplay to stream from Amazon Prime it tries to use Apple TV music.  How can I get it it stream movies from Amazon Prime?

    Welcome to the Apple Community.
    Try the following steps, check whether things are working after each step where appropriate, before trying the next.
    Restart the Apple TV (Settings > General > Restart).
    Restart the Apple TV by removing ALL the cables for 30 seconds.
    Restart your router.
    Reset the Apple TV (Settings > General > Reset > Reset all settings)
    Restore the Apple TV (Settings > General > Reset > Restore)

Maybe you are looking for

  • Switching between office network & home adsl modem

    Small problem. Is it possible for my iBook to automatically detect whether I'm connected to either my office network or my home USB adsl modem? At present, I have to manually go into System Preferences/Network and switch from one to the other and the

  • Mysite is not opening for particular user

    Hi, We have configured User profile service application with permission to create mysite in our environment. One particular user is not able to open mysite. When try to open mysite it generate an unexpected error message and given correlation ID. Whe

  • Video out, NOT.

    We just got a KDL 40w600b 40 inch and are disappointed to find that it has no way to get video out to another room so that the better half can watch from the kitchen and not miss or have to pause the content.Does Sony make anything that we can buy th

  • My ipod touch froze how can i fix it

    I can't get my ipod touch to unfreeze how can i fix it?

  • How to copy field groups when editing a form?

    Hi everyone, I´m setting up a form using Acrobat X Pro. When I copy paste fields, they end up in the same field group. Could anyone tell me how to copy groups? In my case, I would like to copy the answer options from one question, using them as the a