Class UnicodeRange

All Implemented Interfaces:
CssProperty, Serializable, Cloneable

public class UnicodeRange extends AbstractCssProperty<UnicodeRange>
 unicode-range: unicode-range;
 
Optional. Defines the range of unicode characters the font supports. Default value is "U+0-10FFFF"
Since:
1.1.2
See Also:
  • Field Details

  • Constructor Details

    • UnicodeRange

      public UnicodeRange()
      Since:
      1.1.2 initial implementation, 3.0.2 the default value is U+0-10FFFF
    • UnicodeRange

      public UnicodeRange(String cssValue)
      Parameters:
      cssValue - the css value to set.
    • UnicodeRange

      public UnicodeRange(String... unicodeChars)
       Eg:-
       String[] unicodeChars = {"U+0400-045F", "U+0490-0491", "U+04B0-04B1", "U+2116"};
      
       
      Parameters:
      unicodeChars - the unicodeChars to set
      Since:
      1.1.2
    • UnicodeRange

      public UnicodeRange(UnicodeRange fontFamily)
      Parameters:
      fontFamily - the FontFamily object from which the cssValue to set.And, null will throw NullValueException
  • Method Details

    • getBuiltCssValue

      protected static String getBuiltCssValue(String... unicodeChars)
      Parameters:
      unicodeChars -
      Returns:
      Defines the range of unicode characters the font supports. Default value is "U+0-10FFFF"
      Since:
      1.1.2
    • getCssName

      public String getCssName()
      Returns:
      the name portion in style, eg align-content for style align-content: center.
    • getCssValue

      public String getCssValue()
      Returns:
      the value portion in style, eg center for style align-content: center.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setCssValue

      public UnicodeRange setCssValue(String cssValue)
      Specified by:
      setCssValue in class AbstractCssProperty<UnicodeRange>
      Parameters:
      cssValue - The value should be a unicodeChars sequence.
      Returns:
      the current object.
      Since:
      1.1.2
    • setUnicodeChars

      public void setUnicodeChars(String[] unicodeChars)
       Eg:-
       String[] unicodeChars = {"U+0400-045F", "U+0490-0491", "U+04B0-04B1", "U+2116"};
      
       
      Parameters:
      unicodeChars - the unicodeChars to set
      Since:
      1.1.2
    • getUnicodeChars

      public String[] getUnicodeChars()
      gets the unicodeChars as an array and if here is no value set then returns an empty array.
       Note: it will never return null.
       
      Returns:
      the unicodeChars. If there is no unicodeChars set then returns an empty array instead of null.
      Since:
      1.1.2