Package org.loboevolution.html.style
Class FontValues
java.lang.Object
org.loboevolution.html.style.HtmlValues
org.loboevolution.html.style.FontValues
FontValues class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FontKey
getDefaultFontKey
(HtmlRendererConfig config) getDefaultFontKey.static String
getFontFamily
(String fontFamily, RenderState parentRenderState) getFontFamily.static FontKey
getFontKey
(FontKey key, HTMLElementImpl element, CSSStyleDeclaration style, RenderState prevRenderState) Gets the font key.static float
getFontSize
(String spec, Window window, RenderState parentRenderState) Gets the font size.static Integer
getFontSuperScript
(String verticalAlign, RenderState parentRenderState, boolean isSuperscript, boolean isSubscript) getFontSuperScript.static String
getFontVariant
(String fontVariant) getFontVariant.static String
getFontWeight
(String fontWeight, RenderState parentRenderState, boolean isBold) getFontWeight.static boolean
isFontStretch
(String token) Checks if is font stretch.static boolean
isFontStyle
(String token) Checks if is font style.static boolean
isFontVariant
(String token) Checks if is font variant.static boolean
isFontWeight
(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
- aHtmlRendererConfig
object.- Returns:
- a
FontKey
object.
-
getFontKey
public static FontKey getFontKey(FontKey key, HTMLElementImpl element, CSSStyleDeclaration style, RenderState prevRenderState) Gets the font key.- Parameters:
key
- aFontKey
object.element
- aHTMLElementImpl
object.style
- aCSSStyleDeclaration
object.prevRenderState
- aRenderState
object.- Returns:
- a
FontKey
object.
-
getFontSize
Gets the font size.- Parameters:
spec
- the specparentRenderState
- the parent render state- Returns:
- the font size
-
getFontFamily
getFontFamily.
- Parameters:
fontFamily
- aString
object.parentRenderState
- aRenderState
object.- Returns:
- a
String
object.
-
getFontVariant
getFontVariant.
-
getFontSuperScript
public static Integer getFontSuperScript(String verticalAlign, RenderState parentRenderState, boolean isSuperscript, boolean isSubscript) getFontSuperScript.
- Parameters:
verticalAlign
- aString
object.parentRenderState
- aRenderState
object.isSuperscript
- aBoolean
object.isSubscript
- aBoolean
object.- Returns:
- a
Integer
object.
-
getFontWeight
public static String getFontWeight(String fontWeight, RenderState parentRenderState, boolean isBold) getFontWeight.
- Parameters:
fontWeight
- aString
object.parentRenderState
- aRenderState
object.isBold
- aBoolean
object.- Returns:
- a
String
object.
-
isFontStyle
Checks if is font style. -
isFontVariant
Checks if is font variant. -
isFontWeight
Checks if is font weight. -
isFontStretch
Checks if is font stretch.
-