[JS CS3] Referencing a missing font in a paragraph style

I'm stuck on trying to figure out how to reference a font name in a paragraph style if the font is missing. I've got:<br /><br />for (myCounter=0; myCounter<app.documents.item(0).paragraphStyles.length; myCounter ++) {<br />   myParagraphStyle=app.documents.item(0).paragraphStyles.item(myCounter);<br />   if (myParagraphStyle.name.indexOf("[")!=0){<br />      if (myParagraphStyle.appliedFont.name == myFindFontName){<br />         myParagraphStyle.appliedFont = app.fonts.item(myChangeFontName);                            }}}<br /><br />The "myParagraphStyle.appliedFont.name" reference works properly as long as the font used in the paragraph style is present on the system. If the font is missing, then InDesign doesn't seem to "know" its name for me to reference in this manner.<br /><br />Does anyone know a way to do this? Thanks.

Bummer! Thanks for letting me know, so I can stop banging my head against the wall trying to figure it out.
Your approach with the dummy font is clever, but won't help me in this case. I'm trying to automate the "Find Font" process for a group of users. They've used a particular group of fonts for thousands of files, and are switching to a different family of fonts. They want to have ONLY the new family installed. So I wanted to create a script they could run the first time they open each file that would find each old font and replace it with the new font. My script works great for all the text in the file, but not the Paragraph and Character styles.
Can anyone think of another approach? I'm out of ideas on this one.

Similar Messages

  • CS3 is replacing missing fonts with Myriad

    I am opening a file that uses some fonts that are missing. OK, and I get the warning message to that effect. Normally CS3 shows the alert badge on the layer and if the layer is selected & type tool active, it will show you the missing font name in brackets. BUT now when the file opens, there are no alert badges and the fonts are all changed to Myriad!
    I tried deleting my prefs but that didn't help.

    We received similar issue before http://forums.adobe.com/message/3024227#3024227
    Do you have Font Agent Pro? If you do, please remove Font Agent Pro plug-in from Photoshop Plug-ins folder and try.
    Hope this helps.
    Thanks,
    Kyoko

  • Detailed font change in paragraph styles

    Hi there,
    I have a script to change font A to font B in all the Paragraph Styles used in a document, but is there a way of going a bit further with it?, so;
    Change font A "Bold"
    to         font B "SemiBold"
    Change font A "SemiBold"
    to         font B "Regular"
    Any help at all on this one would certainly help me out.
    Cheers,
    Littlemookie

    Yes, these lines should be plugged in into the little script from a while ago.
    for (var i=2; i<app.activeDocument.paragraphStyles.length; i++)
      if (app.activeDocument.paragraphStyles[i].appliedFont == "Arial\tBold")
        app.activeDocument.paragraphStyles[i].appliedFont = "Myriad Pro\tSemibold";
    's all. Change font names where required.
    Duhh, I'm not very good at this!
    At some point in time, neither was I. I just happen to know this area of scripting, others are as unclear to me as well. "Practice" and all ;-)

  • [JS] [CS3] Finding the longest instance of a paragraph style

    I'm pretty new to JS but I'm trying to write a script that will return the longest instance of each paragraph style in a manuscript (which has been imported into InDesign). Currently, my script lists all the paragraph styles found in the document and puts them in a new document. My next thought was to loop through the style names array and find the longest instance.
    Could anyone point me in the right direction on how to do this?
    Any help is much appreciated. I'm learning a lot reading this forum.

    Your question is slightly ambiguous. Do you mean you are looking for the longest instance of a paragraph in that paragraph style? That's the most likely meaning. Or are you looking for the longest run of text in that style? Because that's what you'll find if you're not careful in your script.
    The essence of the script would be:
    1. Setup a FindText for the paragraph style in question (or each style if you're looping through them all).
    setupFindText(); // use function to setup the find -- search this forum on setupFindText to find it
    app.findTextPreferences.appliedParagraphStyle = myStyle; // where myStyle is the style in question
    2. Issue the find getting all the references into a variable.
    var myFinds = app.documents[0].findText();
    3. Loop through all the finds to locate the longest paragraph.
    var longestLength = 0;
    var longestPara = null;
    for (var j = myFinds.length - 1; j >= 0; j--) {
         myParas = myFinds[j].paragraphs;
         for (var k = myParas.length - 1; k >= 0; k--) {
              myPara = myParas[k];
              if (myPara.length > longestLength) {
                   longestLength = myPara.length;
                   longestPara = myPara;
    4. Make sure that longestPara is not null (no instances found); If not, then longestPara is a reference to the longest instance
    Dave

  • Missing fonts - InDesign CS3

    I've read all I could find about mssing fonts, but continue to have problems with opening InDesign files and receiving a message about a missing font(Arial Narrow).
    Indesign CS3 v5.04
    Two users(Administrator & a user(who has Local Administrator rights)  have no problem with missing font when opening the same file.
    Two different users(who both have Local Administrator rights) receive the message about missing font when opening the same file.
    The PC has the font loaded in Windows,
    I have copied Arial Narrow into Adobe\Indesign\Fonts directory
    I have deleted all Adobe*.lst files
    After the Adobe*.lst file is recreated the lst file has the specifics for Arial Narrow in the lst file.
    Not sure what to try next

    I didn't understand from the original message that the users were all working on the same PC. That would point away from the font problem, I think, and maybe toward a preferences corruption, though I couldn't say for sure.
    Certainly I think trying the patch would be good, and yes, there may be Adobefnt*.lst files in each user profile that should be deleted (maybe that's all that's wrong). Otherwise, replacing preferences for the affected users might be in order.
    On the same machine, assuming there is no problem about inidividual user customizations you don't want to share, you can copy the profile data from one user to another without problem, or you can rebuild each bad set from scratch. See this page for instructions (scroll down) and be sure to read the comments.Adobe InDesign CS4 * Setting preferences

  • Flash CS3 - Missing Fonts Alert Dialog box not showing

    We seem to have lost the Alert dialog box when Flash CS3 Pro
    discovers there are missing fonts in a file. We still get the
    warning in the Output box but we get no Alert box to tells us
    actually which fonts we need to locate. This is happening
    regardless of file so it appears to be Flash issue and not a file
    issue.
    Anyone come across this before and anyone know how to fix?

    You need to make sure that the specific camera model is supported by the version of the ACR plug-in you have installed on your machine.
    The current version of ACR (Adobe Camera Raw) is ACR 4.5 and there is also ACR 4.6beta.
    What version are you running and what camera generated your raw files?

  • CS3: Find Font window on open, no missing fonts.

    Is there a way to tell Illustrator not to show the Find Font window when tere are no missing fonts? It's only a whole lot frustrating and annoying.
    I'm sure the fonts are activated in Suitcase Fusion (only just slightly less crappy a an option than no font manager at all). Even if they're not and are auto-activated, the problem occurs with three nearly identical files. If fonts were activated opening the first file, then the next two should be fine. If I then close the files then reopen I get the Find Font window again, so auto-activation has nothing to do with it.

    My solution has always been to hit cancel and just re-open the file(s) I think Illy looks, sees missing fonts, kicks up the warning, then talks to your font manager, so that the warning will come up even though the font manager is working on it...
    Is there a setting in Suitcase that keeps fonts open through a whole session (like until you quit suitcase) rather than closing them when you close the file (as it sounds like is happening for you) I haven't used suitcase since X1 or the one before that, but I seem to remember that closing the offending file and reopening it would work...
    edit: on re-reading your post, is there the possibility of conflicting fonts, as in ps and tt versions of the same font? One may be activated, but it may be looking for the other.

  • Photoshop CC: Missing Fonts on Startup, only a few fonts are displayed as replacement options

    I have a Photoshop document which uses some Fonts that I don't have on my Windows PC. When I open the document, I get a Dialog Box called "Missing Fonts", which states:
    "Some fonts used in this document are missing. You can sync matching fonts from Typekit, or replace missing fonts with a default or different font used in this document"
    This text suggests that I can only replace missing fonts with other fonts already being used in this document. However, I want to replace a missing font with a font that is not yet used in this document. Why can I only replace a missing font with another font already used in the document? For example, I want to replace "Helvetica Neue" with "Liberation Sans", however Liberation Sans is not offered in the Dropdown box, even though it is installed, as it is not yet used in the document. What is the point of only allowing to replace a missing font with a font that is already used in the document, and not with any font installed on the system??
    Thanks,
    best regards,
    Chris

    I'm a windows user so I do not know  the Adobe Photoshop environment on the Mac or the versions of Mac OS.  The only suggestion I could make would then be try using Adobe Cleaner to clean off Photoshop then  install Photoshop  Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Missing fonts in cs4

    Hello All,
    I have installed CS4 on my XP desktop after uninstalling CS2 completely and I am now having some font missings from the applictation.
    Although the font name like "Arial Black" already exist on the PC but its not finding it. When I open an existing Indesign CS2 file( I am getting an error message saying few fonts are missing and then a find a font box coming up with missing font names marked with yellow !.
    I dont know how to add these fonts back into the CS4.
    Someone advised me to delete all "adobefnt*.LST" files but this did not work either for me.
    Please can you advise how to do this?
    Thanks
    S

    Fonts are never unloaded when installing software. In the case of Arial Black, go to Arial, and see if Black has been added to the Arial family (where you see Bold, Italic, etc.). As well, Adobe software will sometimes sort files differently than other applications, so look carefully though the list to see if the ones you are missing are sorted somewhere else.
    Fonts are often loaded with software, and probably this has happened with CS4 (I am on CS3). You might have gotten new versions of some of your old fonts. This could cause the problems you are seeing in ID. I think you can just tell the files to update to the new versions, if this is the case.

  • Missing Fonts from Imported PDFs

    I have a document that has several PDF documents "Placed" in it.  When I go to print, it tells me that I have missing fonts.
    From Find Font, I can see the missing fonts and what PDF they came from.  Only, Find Font won't let me substitute it.
    I can't change the font on the PDF either since it was not made by my department.   I've tried Placing with and without a Frame.  Tried embedded and linked.
    Computer and Program Info
    Windows XP
    InDesign CS3 v 5.0.4
    Program is on my computer / documents saved to server
    User status only - if any updates come along, I have to have IT log in to apply them.

    >
    >"You have a larger problem though. Your organization needs to be trained in the proper way to prepare documents for the intended purposes. If those >purposes include going to print, you need to either have access to the original files or the people making the PDFs MUST be trained to embed fonts."
    >
    I totally agree.  I'd be a lot less stressed if that's how things were done here.  We are a State University who's funding suddenly got cut.  Work study students are cheap (though not as cheap as fixing up any messes they make).  It's also cheaper to hire people who don't have complete training.   Every program I use, I've learned on my own.  I'm at least smart enough to ask questions and read the manual.  When training that my employers can afford (i.e., free) comes up, I attend.  The only saving grace of Aspergers -  I  learn programs (and programming) quickly - maybe not as efficiently as  you - but better than those around me.  I at least knew about embedding  fonts, linking graphics and packaging (my old days on Mac OS7 with PageMaker and Photoshop)
    And at least I can read instructions.   "Place missing fonts in the Fonts Folder, which is located in the InDesign Application Folder." - Adobe Manual
    I just looked.  The folder is empty. And I gave them a print out of the instructions.
    As  for the Plug-in I asked to have installed "Missing Fonts Loader", they  just dumped the plug-in into the Plug-in folder and didn't bother to  read the "how to install" instructions.  IT must have sent a work study  student.  Every time one touches my computer, something goes wrong or  missing.  Once they even installed the same program twice - 1 per  partition.
    Thank goodness the 'work around' did actually  work.  I'll will be working on fixing the problem the correct way, but I  have to has this project ready now - not months from now.

  • InDesign CS3 script that changes fonts on open

    Hello.
    I am trying to come up with a script that would change a specific group of fonts, that will always show up missing, to the new font. Basically, it is a bunch of our postscript fonts that are now using our open type font. Below is what I have so far. I want to create a list that goes through about 8 fonts that are old and replace them on the fly with the 8 new fonts. This would be great if I could have this happen on open.
    Can anyone see what I have and offer some guidance?
    thanks
    babs
    Open this Scriplet in your Editor:
    tell application "Adobe InDesign CS3"
       set find text preferences to nothing
       set change text preferences to nothing
       tell application "Adobe InDesign CS3"
           set OLDfont to {"times", "arial"}
           set NEWfont to {"times new roman", "helvetica"}
           --set find what of find text preferences to testString
           tell document 1
               repeat with swap from 1 to 2
                   set NEWfont to item swap of OLDfont
               end repeat
           end tell
       end tell
    end tell

    For starters, you're going to have to use the correct font names, including correct capitalization. The property you want to change is "applied font", not "find what". And it would probably be more sensible, to go through all paragraph and character styles and make the changes there first, otherwise you'll have troubles again every time you edit stuff.
    So start off by getting the name of the font used in every paragraph style, and loop through your list to see if they should be changed. Do the same for character styles. And then do the find/change to find any that have been applied manually.

  • Missing font in book file

    I've been getting this missing font message when I open a book file:
    The "Arial Black" Font is not available.
      "Arial Black Heavy" will be used in this session.
    Why are there font references in the book file (see .mif excerpt below)?
    Why am I getting this message when Arial Black is installed, and Arial Black Heavy is not?
    <Pgf
      <PgfTag `GroupTitlesIX'>
      <PgfUseNextTag No>
      <PgfNextTag `'>
      <PgfAlignment LeftRight>
      <PgfFIndent  0.0">
      <PgfLIndent  0.0">
      <PgfRIndent  0.0">
      <PgfFIndentRelative No>
      <PgfFIndentOffset  0.0">
      <PgfTopSeparator `'>
      <PgfTopSepAtIndent No>
      <PgfTopSepOffset  0.0">
      <PgfBotSeparator `'>
      <PgfBotSepAtIndent No>
      <PgfBotSepOffset  0.0">
      <PgfPlacement Anywhere>
      <PgfPlacementStyle Normal>
      <PgfRunInDefaultPunct `. '>
      <PgfSpBefore  3.0 pt>
      <PgfSpAfter  3.0 pt>
      <PgfWithPrev No>
      <PgfWithNext Yes>
      <PgfBlockSize 1>
      <PgfFont
       <FTag `'>
       <FFamily `Arial Black'>
       <FVar `Regular'>
       <FWeight `Regular'>
       <FAngle `Regular'>
       <FEncoding `FrameRoman'>
       <FSize  10.0 pt>
       <FUnderlining FNoUnderlining>
       <FOverline No>
       <FStrike No>
       <FChangeBar No>
       <FOutline No>
       <FShadow No>
       <FPairKern No>
       <FTsume No>
       <FCase FAsTyped>
       <FPosition FNormal>
       <FDX  0.0%>
       <FDY  0.0%>
       <FDW  0.0%>
       <FStretch  100.0%>
       <FLanguage USEnglish>
       <FLocked No>
       <FSeparation 5>
       <FColor `Headings'>
      > # end of PgfFont
      <PgfLineSpacing Fixed>
      <PgfLeading  2.0 pt>
      <PgfAutoNum No>
      <PgfNumTabs 0>
      <PgfHyphenate Yes>
      <HyphenMaxLines 2>
      <HyphenMinPrefix 2>
      <HyphenMinSuffix 2>
      <HyphenMinWord 5>
      <PgfLetterSpace No>
      <PgfMinWordSpace 75>
      <PgfOptWordSpace 100>
      <PgfMaxWordSpace 125>
      <PgfMinJRomanLetterSpace 0>
      <PgfOptJRomanLetterSpace 25>
      <PgfMaxJRomanLetterSpace 50>
      <PgfMinJLetterSpace 0>
      <PgfOptJLetterSpace 0>
      <PgfMaxJLetterSpace 10>
      <PgfYakumonoType Floating>
      <PgfAcrobatLevel 0>
      <PgfPDFStructureLevel 1>
      <PgfLanguage USEnglish>
      <PgfCellAlignment Top>
      <PgfCellMargins  0.0 pt 0.0 pt 0.0 pt 0.0 pt>
      <PgfCellLMarginFixed No>
      <PgfCellTMarginFixed No>
      <PgfCellRMarginFixed No>
      <PgfCellBMarginFixed No>
      <PgfLocked No>
    > # end of Pgf

    You might want to read through these threads:
    http://forums.adobe.com/message/1890146#1890146
    http://forums.adobe.com/message/1871457#1871457
    Check out the referenced MS Hotfix.

  • Missing fonts not identified in open documents

    Adobe documentation states that when a document is opened that uses uninstalled fonts, a message will identify the missing fonts and offer to use font substitution. This is not what happens when I open such a document in Photoshop CS3. The warning message does not identify the missing fonts, nor can I click the offending text to get this information because font substitution happens automatically before the file is opened. The result is that I have no idea, in some cases, which fonts are missing. This is incredibly dumb!
    How can I get Photoshop CS3 to tell me which fonts are missing? Thanks!

    Unfortunately, Photoshop DOES substitute fonts. My files most definitely never specified Myriad Pro (which is what all the type in these documents has been converted to) or anything even remotely resembling Myriad Pro. What Photoshop does not do is provide a way to specify the font substitution settings at all.
    As for Suitcase, it has its limitations; but honestly, I am unimpressed by every one of the font management programs out there. I have not had activation problems with Suitcase Fusion in the past, but who knows? Maybe I'll have better luck if I try to open my files in Photoshop CS. Thanks for your feedback!

  • Importing excel with missing fonts

    I've got a spreadsheet for my employees and the spreadsheet does the neccessary calculations and I then import it into indesign cs2 on mac. The problem is it claims the fonts are missing fonts and the layout is compromised. I then have to painstakingly select the fonts. I have read an article saying that there are many different types of filetype for a font. How do I install the neccessary fonts to indesign, I took a look at the fonts folder and there was nothing in here, which is strange as it should have the fonts that are currently available in indesign.
    What filetype of the fonts do I require? Or does anyone have a script for me? The required fonts are:
    Lucidia Grande Bold
    Lucidia Grande Regular
    Times Regular
    Verdana Regular
    Any help appreciated.

    Thanks for all your input people. I am creating the excel worksheet myself from excel 2004 for mac. I can select the fonts and they're available from the selection list. I read that there are many different types of font, post-script, other type etc etc and they look upon them as different fonts though they are the same. I think that could be the problem.
    I'm using an old mac, power pc which is starting to go out of date now, though I am very happy with it and only starting to learn the software. Not sure if CS3 is compatible with my machine, and I really don't want to as most of it is working great.
    Thanks for advice people - much appreciated!

  • Receiving 'Missing Font' message - but have font on my system; and no one can open my PDFs

    I have just started using a new Ind template (developed by someone else). Everytime I go to open the .ind file I get a "Missing Font" error box that says my document "uses one or more fonts which are not currently available on your system." Specifically, the font the error message notes is "Univers 57 Condensed." But I do have that font on my system. I reinstalled all of my Univers fonts again just to be on the safe side, I upgraded from CS3 to CS4 and I updgraded my Acrobat for v6 to v9 and I am still having the issue. Now, I am able to create a PDF and I can open it myself no problem. But when I send the PDF to anyone else they can't open it, and then get an error message that says: "Cannot extract the embedded font 'GRCMCG+UniversLSTD-CN'.  Does anyone have an idea as to what the issue may be - I don't know what else to try. Thank You!!!

    If that's the case the font you've got installed is obviously seen as a different one than the one in the template by Indesign.  Howver once you've used Find Font and saved the document you shouldn't get that warning again, right?
    As to why other people can't open it I don't know....  I have had it in the past when a document is emailed that it gets damaged, could that be a possibility?

Maybe you are looking for