com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class FontFallBackRule

  • java.lang.Object
    • com.aspose.slides.FontFallBackRule
    • Constructor Summary

      Constructors 
      Constructor and Description
      FontFallBackRule(long startIndex, long endIndex, java.lang.String fontNames)
      Creates new instance.
      FontFallBackRule(long startIndex, long endIndex, java.lang.String[] fontNames)
      Creates new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addFallBackFonts(java.lang.String fontName)
      Adds a new font(s) to the list of FallBack fonts.
      void addFallBackFonts(java.lang.String[] fontNames)
      Adds a new fonts to the list of FallBack fonts.
      void clear()
      Removes all fonts from the list.
      java.lang.String get_Item(int index)
      Gets the font name at the specified index.
      int getCount()
      Gets the number of fonts actually defined for range.
      long getRangeEndIndex()
      Get last index of continuous unicode range.
      long getRangeStartIndex()
      Get first index of continuous unicode range.
      int indexOf(java.lang.String fontName)
      Returns an index of the specified rule in the collection.
      void remove(java.lang.String fontName)
      Removes the first occurrence of a specific FallBack font from the list.
      void removeAt(int index)
      Removes the FallBack font at the specified index of the list.
      void setRangeEndIndex(long value)
      Get last index of continuous unicode range.
      void setRangeStartIndex(long value)
      Get first index of continuous unicode range.
      java.lang.String[] toArray()
      Creates and returns an array with all FallBack fonts for this rule.
      java.lang.String[] toArray(int startIndex, int count)
      Creates and returns an array with all FallBack fonts from the specified range in list.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FontFallBackRule

        public FontFallBackRule(long startIndex,
                                long endIndex,
                                java.lang.String fontNames)

        Creates new instance.


         
         // Create new instance of FantFallBackRule with one font.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho");
         // Create new instance of FantFallBackRule with several fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic, Tahoma");
         
        Parameters:
        startIndex - Start index of unicode range
        endIndex - End index of unicode range
        fontNames - Font's name or names (delimited by comma) for FallBack
      • FontFallBackRule

        public FontFallBackRule(long startIndex,
                                long endIndex,
                                java.lang.String[] fontNames)

        Creates new instance.


         
         // Create new instance of FantFallBackRule with two fonts
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, new String[] { "MS Mincho", "MS Gothic"});
         // Create new instance of FantFallBackRule with several fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, new String[] { "MS Gothic", "Tahoma, Times New Roman" });
         
        Parameters:
        startIndex - Start index of unicode range
        endIndex - End index of unicode range
        fontNames - Font's name or names (delimited by comma) for FallBack
    • Method Detail

      • addFallBackFonts

        public final void addFallBackFonts(java.lang.String fontName)

        Adds a new font(s) to the list of FallBack fonts.


         
         // Create new instance of FontFallBackRule
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho");
         //Add a second font to the rule 
         newRule.addFallBackFonts("MS Gothic");
         //Add a third and fourth fonts to the rule 
         newRule.addFallBackFonts("Tahoma, Times New Roman");
         
        Specified by:
        addFallBackFonts in interface IFontFallBackRule
        Parameters:
        fontName - Font's name or names (delimited by comma) for FallBack
      • addFallBackFonts

        public final void addFallBackFonts(java.lang.String[] fontNames)

        Adds a new fonts to the list of FallBack fonts.


         
         //Create new instance of FontFallBackRule
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho");
         //Add of another three fonts to the rule 
         newRule.addFallBackFonts(new String [] {"MS Gothic","Tahoma, Times New Roman"});
         
        Specified by:
        addFallBackFonts in interface IFontFallBackRule
        Parameters:
        fontNames - Font's name or names (delimited by comma) for FallBack
      • setRangeStartIndex

        public final void setRangeStartIndex(long value)

        Get first index of continuous unicode range.

      • getRangeEndIndex

        public final long getRangeEndIndex()

        Get last index of continuous unicode range.

        Specified by:
        getRangeEndIndex in interface IFontFallBackRule
      • setRangeEndIndex

        public final void setRangeEndIndex(long value)

        Get last index of continuous unicode range.

      • getCount

        public final int getCount()

        Gets the number of fonts actually defined for range. Read-only int.

        Specified by:
        getCount in interface IFontFallBackRule
      • clear

        public final void clear()

        Removes all fonts from the list.

        Specified by:
        clear in interface IFontFallBackRule
      • remove

        public final void remove(java.lang.String fontName)

        Removes the first occurrence of a specific FallBack font from the list.


         
         // Create a rule contains a list of fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic, Tahoma, Times New Roman");
         // Remove Tahoma from the list.
         newRule.remove("Tahoma");
         
        Specified by:
        remove in interface IFontFallBackRule
        Parameters:
        fontName - The font's name to remove from the list.
      • removeAt

        public final void removeAt(int index)

        Removes the FallBack font at the specified index of the list.


         
         // Create a rule contains a list of fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic, Tahoma, Times New Roman");
         //Removing Tahoma from the list.
         newRule.remove(2);
         
        Specified by:
        removeAt in interface IFontFallBackRule
        Parameters:
        index - The zero-based index of the font to remove.
      • toArray

        public final java.lang.String[] toArray()

        Creates and returns an array with all FallBack fonts for this rule.


         
         // Create a rule contains a list of fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic, Tahoma, Times New Roman");
         // Get all font names as array.
         String[] fontNames = newRule.toArray();
         
        Specified by:
        toArray in interface IFontFallBackRule
        Returns:
        Array of String
      • toArray

        public final java.lang.String[] toArray(int startIndex,
                                                int count)

        Creates and returns an array with all FallBack fonts from the specified range in list.

         // Create a rule contains a list of fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic, Tahoma, Times New Roman");
         // Get a last two font names as array.
         String[] fontNames = newRule.toArray(2, 2);
         
        Specified by:
        toArray in interface IFontFallBackRule
        Parameters:
        startIndex - An index of a first font to add.
        count - A number of fonts to add.
        Returns:
        Array of String
      • indexOf

        public final int indexOf(java.lang.String fontName)

        Returns an index of the specified rule in the collection.


         
         // Create a rule contains a list of fonts.
         IFontFallBackRule newRule = new FontFallBackRule(0x3040, 0x309F, "MS Mincho, MS Gothic, Tahoma, Times New Roman");
         // Get index of Tahoma.
         int tahomaIndex = newRule.indexOf("Tahoma");
         
        Specified by:
        indexOf in interface IFontFallBackRule
        Parameters:
        fontName - Font's name to find.
        Returns:
        Index of a font or -1 if font not found in list.