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

Peter Zhelezniakov Peter.Zhelezniakov at oracle.com
Thu May 10 04:14:43 PDT 2012


Hi Richard,

On 05/10/12 05:12, Richard Bair wrote:
> It seems like it should just be on by default. The controls all require FX CSS anyway, so it made sense to toggle it there (since we didn't want all text nodes to use LCD for performance reasons).
> 
> I don't know that it makes sense to default to gray scale and require CSS to "fix" the default.


Ok, I've changed the default to LCD, and removed now unneeded changes to
caspian.css:

    /**
     * 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.LCD
     */
    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;
    }

    /**
     * @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!
-- 
Peter


More information about the openjfx-dev mailing list