Package org.eclipse.e4.ui.css.core.css2

# Class CSS2FontHelper

java.lang.Object
org.eclipse.e4.ui.css.core.css2.CSS2FontHelper

public class CSS2FontHelper extends Object
CSS2 Font Helper.

Version:
  1.0.0
Author:
  Angelo ZERR

## Constructor Summary

Constructors
Constructor
Description
`CSS2FontHelper()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`getCSSFontPropertyName(CSSPrimitiveValue value)`
Return the CSS Font Property name (font-style, font-weight, font-size, font-family) switch the `CSSPrimitiveValue` `value`.
`static String`
`getFontFamily(String family)`
Return CSS2 font-family.
`static String`
`getFontSize(int size)`
Return CSS2 font-size of int `size`.
`static String`
`getFontStyle(boolean isItalic)`
Return CSS2 font-style.
`static String`
`getFontWeight(boolean isBold)`
Return CSS2 font-weight.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CSS2FontHelper

public CSS2FontHelper()

## Method Details

### getFontFamily

public static String getFontFamily(String family)
Return CSS2 font-family. Escape font `family` with " if need.

### getFontSize

public static String getFontSize(int size)
Return CSS2 font-size of int `size`.

### getFontStyle

public static String getFontStyle(boolean isItalic)
Return CSS2 font-style.

### getFontWeight

public static String getFontWeight(boolean isBold)
Return CSS2 font-weight.

### getCSSFontPropertyName

public static String getCSSFontPropertyName(CSSPrimitiveValue value)
Return the CSS Font Property name (font-style, font-weight, font-size, font-family) switch the `CSSPrimitiveValue` `value`.