0 Replies Latest reply on Apr 11, 2011 11:06 PM by Bradley.Ni

    Bug for Indesign CS3 scripting composite font

    Bradley.Ni

      Hi Dear,

       

      I think it must be a bug for all versions Indesign scripting, when I use script to name a series of composite font, it report duplicate composite fonts when save and re-open the document. That because when name a composite font by script Indesign save the fonts with same name, and the name defined in script is actually the "full name" property. I has tested all versions. Anyone have idea for it?

       

      Below is a sample vbs code, I believe JS should be the same.

      ----------------------------------------------------------------------------------------

      Set Myindesign=createobject("Indesign.application.cs5")
      set mydocument=myindesign.activedocument

      for each myfont in mydocument.fonts

      set mycompofont=mydocument.CompositeFonts.add
      mycompofont.CompositeFontEntries(1).appliedfont=myindesign.fonts(10).fontfamily  'assume it's a Asian font
      mycompofont.CompositeFontEntries(1).fontstyle=myindesign.fonts(10).fontstylename
      mycompofont.CompositeFontEntries(2).appliedfont=myindesign.fonts(10).fontfamily
      mycompofont.CompositeFontEntries(2).fontstyle=myindesign.fonts(10).fontstylename
      mycompofont.CompositeFontEntries(3).appliedfont=myindesign.fonts(10).fontfamily
      mycompofont.CompositeFontEntries(3).fontstyle=myindesign.fonts(10).fontstylename
      mycompofont.CompositeFontEntries(4).appliedfont=myindesign.fonts(10).fontfamily
      mycompofont.CompositeFontEntries(4).fontstyle=myindesign.fonts(10).fontstylename
      mycompofont.CompositeFontEntries(5).appliedfont=myfont.fontfamily
      mycompofont.CompositeFontEntries(5).fontstyle=myfont.fontstylename
      mycompofont.CompositeFontEntries(6).appliedfont=myfont.fontfamily
      mycompofont.CompositeFontEntries(6).fontstyle=myfont.fontstylename
      mycompofont.name=left(myindesign.fonts(10).fontfamily,4) &left(myindesign.fonts(10).fontstylename ,4) & "-" & left(myfont.fontfamily,4) &left(myfont.fontstylename,4)

      next

      -----------------------------------------------------------------------------------------

       

      i can notice what write in AdobeFnt11.lst

       

      %BeginFont
      Handler:DirectoryHandler
      FontType:Rearranged
      FontName:ATC-590d54085b574f53*1
      FamilyName:DFPWW7-Helv46 L
      FullName:DFPWW7-Helv46 L
      MenuName:DFPWW7-Helv46 L

       

      %BeginFont
      Handler:DirectoryHandler
      FontType:Rearranged
      FontName:ATC-590d54085b574f53*1
      FamilyName:DFPWW7-Helv55 R
      FullName:DFPWW7-Helv55 R
      MenuName:DFPWW7-Helv55 R