API REVIEW request for RT-19042: Add fontSmoothingType API to WebView
Richard Bair
richard.bair at oracle.com
Mon May 7 12:36:12 PDT 2012
Hi Sergey,
Looks fine. The one thing here is that the documentation states that it defaults to GRAY, but I think in WebView you want to default to LCD?
Thanks
Richard
On May 4, 2012, at 7:50 AM, Sergey Malenkov wrote:
> JIRA: http://javafx-jira.kenai.com/browse/RT-19042
>
> We need ability to control the font smoothing type during the text rendering.
>
> 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 (cssref.html).
>
> 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
> */
> @Deprecated
> 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();
> }
>
>
> Thanks,
> SAM
More information about the openjfx-dev
mailing list