Class CSS2FontHelper
java.lang.Object
org.eclipse.e4.ui.css.core.css2.CSS2FontHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCSS font-weight of a bold face.static final intCSS font-weight of a regular face. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn the CSS Font Property name (font-style, font-weight, font-size, font-family) for the givenvalue,nullif the value belongs to none of them.static StringgetFontFamily(String family) Return CSS2 font-family.static StringgetFontSize(int size) Return CSS2 font-size of intsize.static StringgetFontStyle(boolean isItalic) Return CSS2 font-style.static StringgetFontWeight(boolean isBold) Return CSS2 font-weight.static OptionalIntgetFontWeight(CssValues.CssPrimitive value, int inheritedWeight) Numeric font-weight ofvalue, empty if it is not a weight.
-
Field Details
-
FONT_WEIGHT_NORMAL
public static final int FONT_WEIGHT_NORMALCSS font-weight of a regular face.- See Also:
-
FONT_WEIGHT_BOLD
public static final int FONT_WEIGHT_BOLDCSS font-weight of a bold face.- See Also:
-
-
Constructor Details
-
CSS2FontHelper
public CSS2FontHelper()
-
-
Method Details
-
getFontFamily
-
getFontSize
Return CSS2 font-size of intsize. -
getFontStyle
Return CSS2 font-style. -
getFontWeight
Return CSS2 font-weight. -
getFontWeight
Numeric font-weight ofvalue, empty if it is not a weight. Relative keywords are resolved againstinheritedWeight. -
getCSSFontPropertyName
Return the CSS Font Property name (font-style, font-weight, font-size, font-family) for the givenvalue,nullif the value belongs to none of them.
-