Class CSS20Attribute

java.lang.Object
com.adobe.fontengine.inlineformatting.css20.CSS20Attribute

public final class CSS20Attribute extends Object
This class holds the CSS attributes that can be used to tag an AttributedRun. Objects of this class are used as the value entries of the ElementAttribute.CSS20Attribute tag.

Concurrency

Instances of this class are immutable after construction and contain no mutable static data. Therefore, they are threadsafe.
  • Constructor Details

    • CSS20Attribute

      public CSS20Attribute(String[] familyNames, CSS20Attribute.CSSStyleValue style, CSS20Attribute.CSSVariantValue variant, CSS20Attribute.CSSStretchValue stretch, CSS20Attribute.CSSWeightValue weight, double pointSize, double opticalSize)
      Constructor. It is highly recommended that the String objects have had the java.lang.String.intern() method called on them. This will greatly improve the performance of the formatting operations.
      Parameters:
      familyNames - array of the font family names - this must not be null
      style - the font style
      variant - the font variant
      stretch - the font stretch
      weight - the font weight
      pointSize - the point size (this must be equal to or greater than zero)
      opticalSize - the optical size used for selecting optical font variants
    • CSS20Attribute

      public CSS20Attribute(String[] familyNames, CSS20Attribute.CSSStyleValue style, CSS20Attribute.CSSVariantValue variant, CSS20Attribute.CSSStretchValue stretch, CSS20Attribute.CSSWeightValue weight, double pointSize)
      Constructor. This is a convenience constructor that assumes that the optical size is equal to the point size. This is likely to the be the case for most uses. It is highly recommended that the String objects have had the java.lang.String.intern() method called on them. This will greatly improve the performance of the formatting operations.
      Parameters:
      familyNames - array of the font family names - this must not be null
      style - the font style
      variant - the font variant
      stretch - the font stretch
      weight - the font weight
      pointSize - the point size (this must be equal to or greater than zero)
    • CSS20Attribute

      public CSS20Attribute(CSS20Attribute properties)
      Copy constructor.
      Parameters:
      properties -
  • Method Details

    • getFamilyNamesList

      public List getFamilyNamesList()
      Returns:
      - the familyNames.
    • getFamilyNames

      public String[] getFamilyNames()
    • getStyle

      public CSS20Attribute.CSSStyleValue getStyle()
      Returns:
      - the style.
    • getWeight

      public int getWeight()
      Returns:
      - the weight after resolving for "bolder" and "lighter".
    • getVariant

      public CSS20Attribute.CSSVariantValue getVariant()
      Returns:
      - the variant.
    • getStretch

      public CSS20Attribute.CSSStretchValue getStretch()
      Returns:
      - the stretch.
    • getPointSize

      public double getPointSize()
      Returns:
      - the point size.
    • getOpticalSize

      public double getOpticalSize()
      Returns:
      - the optical size.
    • toString

      public String toString()
      Overrides:
      toString in class Object