4 Replies Latest reply on Apr 6, 2011 2:43 AM by Bradley.Ni

    Why my font retrive script works so slow!

    Bradley.Ni

      Hi Dear,

       

      I writen a script to list all application fonts for user to select, but it works really slow, about 3 minutes. If you know there is a faster way? Thanks

       

      sub getfontlist ()

      dim myfontlist()

      on error resume next
      for m=1 to myindesign.fonts.count-1
        if myindesign.fonts(m).WritingScript>0 then

         redim preserve myfontlist(n-1)
         myfontlist(n-1)=myindesign.fonts(m).name
           
         n=n+1
        end if
          

      next
      err.clear

      end sub

       

      as to myindesign.fonts(m).WritingScript>0, it's because I only want to list all non-Latin fonts.