Class FontValues

java.lang.Object
org.loboevolution.html.style.HtmlValues
org.loboevolution.html.style.FontValues

public class FontValues extends HtmlValues

FontValues class.

  • Constructor Details

    • FontValues

      public FontValues()
  • Method Details

    • getDefaultFontKey

      public static FontKey getDefaultFontKey(HtmlRendererConfig config)

      getDefaultFontKey.

      Parameters:
      config - a HtmlRendererConfig object.
      Returns:
      a FontKey object.
    • getFontKey

      public static FontKey getFontKey(FontKey key, HTMLElementImpl element, CSSStyleDeclaration style, RenderState prevRenderState)
      Gets the font key.
      Parameters:
      key - a FontKey object.
      element - a HTMLElementImpl object.
      style - a CSSStyleDeclaration object.
      prevRenderState - a RenderState object.
      Returns:
      a FontKey object.
    • getFontSize

      public static float getFontSize(String spec, Window window, RenderState parentRenderState)
      Gets the font size.
      Parameters:
      spec - the spec
      parentRenderState - the parent render state
      Returns:
      the font size
    • getFontFamily

      public static String getFontFamily(String fontFamily, RenderState parentRenderState)

      getFontFamily.

      Parameters:
      fontFamily - a String object.
      parentRenderState - a RenderState object.
      Returns:
      a String object.
    • getFontVariant

      public static String getFontVariant(String fontVariant)

      getFontVariant.

      Parameters:
      fontVariant - a String object.
      Returns:
      a String object.
    • getFontSuperScript

      public static Integer getFontSuperScript(String verticalAlign, RenderState parentRenderState, boolean isSuperscript, boolean isSubscript)

      getFontSuperScript.

      Parameters:
      verticalAlign - a String object.
      parentRenderState - a RenderState object.
      isSuperscript - a Boolean object.
      isSubscript - a Boolean object.
      Returns:
      a Integer object.
    • getFontWeight

      public static String getFontWeight(String fontWeight, RenderState parentRenderState, boolean isBold)

      getFontWeight.

      Parameters:
      fontWeight - a String object.
      parentRenderState - a RenderState object.
      isBold - a Boolean object.
      Returns:
      a String object.
    • isFontStyle

      public static boolean isFontStyle(String token)
      Checks if is font style.
    • isFontVariant

      public static boolean isFontVariant(String token)
      Checks if is font variant.
    • isFontWeight

      public static boolean isFontWeight(String token)
      Checks if is font weight.
    • isFontStretch

      public static boolean isFontStretch(String token)
      Checks if is font stretch.