Package org.loboevolution.html.style
Class FontValues
java.lang.Object
org.loboevolution.html.style.HtmlValues
org.loboevolution.html.style.FontValues
FontValues class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FontKeygetDefaultFontKey(HtmlRendererConfig config) getDefaultFontKey.static StringgetFontFamily(String fontFamily, RenderState parentRenderState) getFontFamily.static FontKeygetFontKey(FontKey key, HTMLElementImpl element, CSSStyleDeclaration style, RenderState prevRenderState) Gets the font key.static floatgetFontSize(String spec, Window window, RenderState parentRenderState) Gets the font size.static IntegergetFontSuperScript(String verticalAlign, RenderState parentRenderState, boolean isSuperscript, boolean isSubscript) getFontSuperScript.static StringgetFontVariant(String fontVariant) getFontVariant.static StringgetFontWeight(String fontWeight, RenderState parentRenderState, boolean isBold) getFontWeight.static booleanisFontStretch(String token) Checks if is font stretch.static booleanisFontStyle(String token) Checks if is font style.static booleanisFontVariant(String token) Checks if is font variant.static booleanisFontWeight(String token) Checks if is font weight.Methods inherited from class org.loboevolution.html.style.HtmlValues
getListStyle, getListStyleImage, getListStylePosition, getListStyleType, getPixelSize, getPixelSize, isBackgroundAttachment, isBackgroundPosition, isBackgroundRepeat, isBorderStyle, isGradient, isUnits, isUrl, quoteAndEscape, resolutionValue, splitCssValue, unquoteAndUnescape
-
Constructor Details
-
FontValues
public FontValues()
-
-
Method Details
-
getDefaultFontKey
getDefaultFontKey.
- Parameters:
config- aHtmlRendererConfigobject.- Returns:
- a
FontKeyobject.
-
getFontKey
public static FontKey getFontKey(FontKey key, HTMLElementImpl element, CSSStyleDeclaration style, RenderState prevRenderState) Gets the font key.- Parameters:
key- aFontKeyobject.element- aHTMLElementImplobject.style- aCSSStyleDeclarationobject.prevRenderState- aRenderStateobject.- Returns:
- a
FontKeyobject.
-
getFontSize
Gets the font size.- Parameters:
spec- the specparentRenderState- the parent render state- Returns:
- the font size
-
getFontFamily
getFontFamily.
- Parameters:
fontFamily- aStringobject.parentRenderState- aRenderStateobject.- Returns:
- a
Stringobject.
-
getFontVariant
getFontVariant.
-
getFontSuperScript
public static Integer getFontSuperScript(String verticalAlign, RenderState parentRenderState, boolean isSuperscript, boolean isSubscript) getFontSuperScript.
- Parameters:
verticalAlign- aStringobject.parentRenderState- aRenderStateobject.isSuperscript- aBooleanobject.isSubscript- aBooleanobject.- Returns:
- a
Integerobject.
-
getFontWeight
public static String getFontWeight(String fontWeight, RenderState parentRenderState, boolean isBold) getFontWeight.
- Parameters:
fontWeight- aStringobject.parentRenderState- aRenderStateobject.isBold- aBooleanobject.- Returns:
- a
Stringobject.
-
isFontStyle
Checks if is font style. -
isFontVariant
Checks if is font variant. -
isFontWeight
Checks if is font weight. -
isFontStretch
Checks if is font stretch.
-