API REVIEW request for RT-19042: Add fontSmoothingType API to WebView

Sergey Malenkov Sergey.Malenkov at oracle.com
Fri May 4 07:50:41 PDT 2012

JIRA:  http://javafx-jira.kenai.com/browse/RT-19042

We need ability to control the font smoothing type during the text 

Our proposal for JavaFX 2.2 is to add a new property to the WebView 
class, which should be similar to the fontSmoothingType property of the 
Text class. Also we should add new style class (web-view) to the default 
JavaFX style (caspian.css) and describe it in the CSS reference document 

webrev: http://javaweb.us.oracle.com/jcg/fx-webrevs/RT-19042/2/

The proposed public API (including javadoc) is copied from the Text class:

  * Specifies a requested font smoothing type : gray or LCD.
  * The width of the bounding box is defined by the widest row.
  * Note: LCD mode doesn't apply in numerous cases, such as various
  * compositing modes, where effects are applied and very large glyphs.
  * @defaultValue FontSmoothingType.GRAY
private ObjectProperty<FontSmoothingType> fontSmoothingType;

public final void setFontSmoothingType(FontSmoothingType value) {...}

public final FontSmoothingType getFontSmoothingType() {...}

public final ObjectProperty<FontSmoothingType> 
fontSmoothingTypeProperty() {...}

  * Super-lazy instantiation pattern from Bill Pugh.
  * StyleableProperties is referenced no earlier
  * (and therefore loaded no earlier by the class loader)
  * than the moment that {@code impl_CSS_STYLEABLES()} is called.
  * @return          list of supported styleable properties
  * @treatAsPrivate  implementation detail
  * @deprecated      this is an internal API
  *                  that is not intended for use
  *                  and will be removed in the next version
public static List<StyleableProperty> impl_CSS_STYLEABLES() {
     return WebView.StyleableProperties.STYLEABLES;

  * RT-19263
  * @return          list of supported styleable properties
  * @treatAsPrivate  implementation detail
  * @deprecated      this is an experimental API
  *                  that is not intended for general use
  *                  and is subject to change in future versions
@Deprecated @Override
public List<StyleableProperty> impl_getStyleableProperties() {
     return impl_CSS_STYLEABLES();


More information about the openjfx-dev mailing list