I promise you that the font _is_ there. :(

OK, so I am having problems dynamically managing fonts in an automated build process.
To be clear;
a) I have a font
b) I really, really, really _know_ that I have this font
c) I checked again, the font _is_ there
Having checked all that, I search for the font using app.fonts.itemByName(fontName) and then try to _use_ the font that I _know_ that I have.
It works for roughly 650 out of 710 fonts.
For the others... I just see "The requested font style is not available."
_WHY_?
_WHY_?
Please, please, please...
Anybody?
Thanks,
G
found.fontFamily : Baskerville
found.fontStyleName : Regular
found.fontStyleNameNative : Regular
found.fontType : 1718898516(OPENTYPE_TT)
found.fullName : Baskerville
found.fullNameNative : Baskerville
found.index : -1
found.isValid : true
found.location : C:\Program Files\Adobe\Adobe InDesign CC 2014\Fonts\Baskerville.ttf
found.name : Baskerville
Regular
found.ordering :
found.parent : [object Application]
found.platformName : Baskerville
found.postscriptName : Baskerville
found.properties : [object Object]
found.registry :
found.restrictedPrinting : false
found.status : 1718831470 (ok)
found.version : Version 1.00
found.writingScript : 0
ERROR: {"fileName": "printFinal.jsx", "lineNumber": "368", "templateId": "TEMPLATE", "message": "The requested font style is not available.", "inputArguments": {}}
[code]
var found = app.fonts.itemByName(cleanedFontFamily);
                function writeFontType(val) {
                    switch(val) {
                        case FontTypes.ATC : return "ATC";
                        case FontTypes.BITMAP: return "BITMAP";
                        case FontTypes.CID : return "CID";
                        case FontTypes.OPENTYPE_CFF : return "OPENTYPE_CFF";
                        case FontTypes.OPENTYPE_CID : return "OPENTYPE_CID";
                        case FontTypes.OPENTYPE_TT : return "OPENTYPE_TT";
                        case FontTypes.TRUETYPE : return "TRUETYPE";
                        case FontTypes.TYPE_1 : return "TYPE_1";
                        case FontTypes.UNKNOWN : return "UNKNOWN";
                    return "unknown";
                this.debug("\tNATIVE:\n\t"+[
"found.fontFamily : "+found.fontFamily,
"found.fontStyleName : "+found.fontStyleName,
"found.fontStyleNameNative : "+found.fontStyleNameNative,
"found.fontType : "+found.fontType+"("+(writeFontType(found.fontType))+")",
"found.fullName : "+found.fullName,
"found.fullNameNative : "+found.fullNameNative,
"found.index : "+found.index,
"found.isValid : "+found.isValid,
"found.location : "+found.location,
"found.name : "+found.name,
"found.ordering : "+found.ordering,
"found.parent : "+found.parent,
"found.platformName : "+found.platformName,
"found.postscriptName : "+found.postscriptName,
"found.properties : "+found.properties,
"found.registry : "+found.registry,
"found.restrictedPrinting : "+found.restrictedPrinting,
"found.status : "+found.status+" ("+(found.status==FontStatus.INSTALLED?"ok":"investigate")+")",
"found.version : "+found.version,
"found.writingScript : "+found.writingScript
                ].join("\n\t"));
                style.appliedFont = found;
[/code]

Hi Marc,
First of all, thanks a million for correcting my font reference name - I couldn't find any documentation on what it should have been so I tried a few things and ended up using what my predecessors had used (which was... wrong). I've now corrected the lookup to use the correct format and I have eliminated about 90% of my font lookup issues.
Which means that I am left with the tricky ones.
Taking the Baskerville font as an example;
1. I am importing a snippet with IDML stating appliedFont = Baskerville
2. When I test the relevant style ranges, they are reporting appliedFont = Baskerville (TT)
3. If I look for app.fonts.itemByName("Baskerville (TT)\tRegular") I get index = -1; (thanks for giving me that test for font install also!) and font is not found
4. If I look for app.fonts.itemByName("Baskerville\tRegular") I get a valid index and no error when I try to use the font... But...
5. Whatever I do, the preflight fails with uninstalledFonts "Baskerville (TT)"
I've dug a little deeper here; I saved as IDML, and looked at the fonts.xml file; there are two Baskerville fonts listed... and there shouldn't be. I can _manually_ edit the Fonts.xml file in IDML then open in InDesign and save as INDD... _then_ my scripted build process works.
But...
I can't do that across the millions (literally) of legacy INDD files that I have running around here.
Any ideas how to eradicate broken font references like this without manually editing IDML / XML?
Thanks,
G

Similar Messages

  • I am using InDesign CC and added Garamond premier pro font. This has worked for months, now suddenly my entire book is  highlighted in pink and my font is missing! I get the message that the font is currently unavailable on my computer, how can i get it b

    I am using InDesign CC and added Garamond premier pro font. This has worked for months, now suddenly my entire book is  highlighted in pink and my font is missing! I get the message that the font is currently unavailable on my computer, how can i get it back?

    BlazingRiver wrote:
    So my computer is running on OSX but my question is if any of the viruses on my windows partition can still run and communicate information to their 'master' as there is still a supply of electricity? Sorry if its obvious.
    Here's a positive thing: Windows viruses can't run on OS X, but they can be transferred from OS X to other PCs (only if you have them on the OS X volume).
    BlazingRiver wrote:
    1. How could a trusted source e.g. Google and Steam contain viruses if they are downloaded from the original source? and
    You could get a virus from a different source that infected Steam and Chrome without any problem. Viruses normally try to infect as many files and programmes as possible.
    BlazingRiver wrote:
    2. Can iOS devices get viruses and I know this is probably in the wrong but 3. What anti-virus scanner and remover tool do you recommend for windows. The only one I am familiar with is Kaspersky?
    iPhones, iPads and iPods touch can't get viruses but they can transfer them to other PCs. For Windows, I recommend Microsoft Security Essentials

  • How do you set the font color for a specific entire row inside a JTable?

    How do you set the font color for a specific entire row inside a JTable?
    I want to change the font color for only a couple of rows inside a JTable.
    I've seen some ways to possibly do this with an individual cell.
    Clarification on changing the font color in an individual cell would be helpful too if
    there is no easy way to do this for a row.

    hai,
    Try out with this piece of code.Create your table and assign the renderer to each column in the table.
    CellColorRenderer m_CellColorRenderer = new CellColorRenderer();
    for(int i=0;i<your_JTable.getColumnCount();i++)
    your_JTable.getColumnModel().getColumn(i).setCellRenderer(m_CellColorRenderer);
    class CellColorRenderer extends JLabel implements TableCellRenderer
    CellColorRenderer()     
    setOpaque(true);     
    setHorizontalAlignment(LEFT);
    setVerticalAlignment(CENTER);
    setBackground(Color.white);
    setForeground(Color.black);
    protected void setValue(Object value)
         setText((value == null) ? "" : value.toString());
    public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected, boolean hasFocus, int row,int column)
         if(isSelected == true)
              setForeground(Color.red);
         else
              setForeground(Color.black);
         setValue(value);
         return this;
    regards,
    bala

  • How do you increase the font size to bigger than 24, using the typewriter tool in Adobe Acrobat Pro 9 for Mac?

    How do you increase the font size to bigger than 24, using the typewriter tool in Adobe Acrobat Pro 9 for Mac?   Often I just want to label an item on a map that is in PDF and want to use a simple label rather than a Text Box for labeling, but have yet to find a way to increase the font size beyond 24.   Can someone help me with this? - JML

    Read this:
    https://forums.adobe.com/thread/1468782?sr=stream&ru=2382437

  • How do you change the font size?

    This is a rather simple question.
    How do you change the font size in flex builder 2?
    In the preferences for flex>editors there is no option to
    change any font settings.
    i'm sitting quite far away from my LCD and can hardly make
    out the text.

    Window -> Preferences -> General ->Colors and
    fonts

  • How do you adjust the font size for the tabs and icons around the screen?

    How do  you adjust the font size of tabs and and icons to ake them larger?

    sfcalling
    Click on the text in the menu so that you see the bounding box around it. Look to the right of the Movie Menu customization workspace, Adjustments Palette, Text and edit your text font style and size.
    In this screenshot, "Glass Flowers" text in the main menu is selected and its Adjustments Palette Text editing opportunities are shown. To do comparable editing in the scene menu, click on the scene menu in the bin to bring its image up to the screen.
    Please let us know if you are OK with the details.
    Please also review the following Adobe document on disc menus which applies to both version 11 and 12.
    Adobe Premiere Elements 11 * Creating disc menus
    By the way, what computer operating system is your Premiere Elements 12 running on?
    Thanks.
    ATR

  • How can you change the font size in the application and system headers?

    How can you change the font size in the application and system headers?  I searched the system and finder prefs to no avail.  Changing the screen density is not a good option.
    Thanks

    I downloaded Tinkertool.  Found the font section and increased the size of most selections.  The only thing that changed that I can see is the window label.  The apple line, bookmarks line, the tool bar in safari are all the same---font size of about 4.  Found the finder "show view options" but that didn't seem to change anything either.  I'll keep working.  Restarted all apps after changes as well.

  • Pages are not scaled correctly, if you change the font size in browser (Fireworks export in CSS)

    I created some simple pages for my website with fireworks. I only used images and text and exported the pages in CSS and images. The Problem is that if you change the font size in the browser text and images or text and text often overlap each other. So what can I do that the page is scaled correctly?

    Yep, the "Font Size" option under Setup / Display is certainly not what it should be.
    Perhaps Menu or Fixed Font size would be more accurate.
    This problem extends to much of the device; the Browser, e-mails and the lock screen.  Lock screen certainly looks like it was thrown together.

  • Can you increase the fonts for your iphone 5s

    I can increase the fonts for my email and texts but can you increase the fonts for everything on your iphone, example apps

    If by "for the Apps" you mean the app labels? No. But you might try experimenting with Accessibility settings to see if you can acheive something that will help. As for the size of text within an app, that would depend on whether the app provides that configuration setting.

  • HT4972 How can I zoom the web page only vertically or horizontally ,i.e.,wThen I want to read the web page can I enlarge the page so that the font only increases size ?

    How can I zoom the web page only vertically or horizontally ,i.e.,wThen I want to read the web page can I enlarge the page so that the font only increases size ?

    You can't.  (Fonts increase in size like everything else, not in height alone).

  • How do you change the font of everything?

    How do you change the font of all text?

    You cannot. Only you can adjust the size the default font.
    You can only have font options in Notes.

  • How do you change the font color in CALL-OUT text boxes in PRO XI?

    How do you change the font color in CALL-OUT text boxes in PRO XI?

    It's not so simple to find it if you don't know what you're looking for... But it can be found via View - Show/Hide - Toolbar Items - Properties Bar.

  • HT4759 ow do you restore the iphone when there is a passcode and you do not remember it??

    how do you restore the iPhone when there is a passcode on it and u for get the passcode?? help me please

    You need to follow the steps in this knowledge base article, may take more than one attempt for it to work.

  • How do you repair the EFI systems partitions when you mac tells you that the live file system is not supported?

    how do you repair the EFI systems partitions when you mac tells you that the live file system is not supported?

    I don't have good news. You will need to repartition and reformat the hard drive in order to determine if the drive is still OK or if it needs to be replaced. If your computer is a 2011 model or later do the following:
    Install Mavericks, Lion/Mountain Lion Using Internet Recovery
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Internet Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.
    Partition and Format the hard drive:
    Select Disk Utility from the main menu and click on the Continue button.
    After DU loads select your newly installed hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed. Quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion. Mavericks: Select Reinstall Lion/Mountain Lion, Mavericks and click on the Install button. Be sure to select the correct drive to use if you have more than one.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    This should restore the version of OS X originally pre-installed on the computer.
    If your computer is pre-2011 model, then locate the original installer discs that came with the computer. Then do this:
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1. You can now download a version of OS X from which to upgrade from your Purchases page in the App Store.

  • HT3529 how do you change the font size on your text messaging on the iphone 4s

    how do you change the font size on your text messaging on the iphone 4s

    Settings > General > Accessibility > Large Text.

Maybe you are looking for

  • Software updates not working (sort of)

    Hi everyone. I have an OS X Server (10.6.7) running Software Update 4.0.6 (470) the Server Admin is version 10.6.5 and I have this server to manage several other Macs in my company. The issue I have is (besides the fact I know very little about Macs)

  • Refresher: Apple in-app purchase requirement

    Hey, Guys, Digging through all the routine documentation and can't seem to find Apple's requirement (been a while since we've dealt with this particular topic). Scenario: A client is aiming to launch a new magazine app in the Newsstand. They'll have

  • Reg function module POSTING_INTERFACE_CLEARING

    Dear experts, I have a requirement in tcode FB05(Posting with clearing: Initial screen).  In that i need to select the radio button 'Transfer Posting with Clearing'.  I dont know exactly what happens here. I have to use function module POSTING_INTERF

  • Generate File Excel .xls

    Hi there, Is possible generate excel file (.xls) with Data Services 3.2 (Windows Server) ? tks Rodrigo

  • What is the use of creating proxy services using WSDL.

    Hi Am a beginner in ALSB and i have a basic question. Business services are created using WSDL,thats sounds logical as we need to invoke the actual backend services . Proxy services are connected to business services and what is the need that it can