/** * Sets whether smoothing (i.e., GL_LINEAR filtering) is enabled * in the backing TextureRenderer of this TextRenderer. A few * graphics cards do not behave well when this is enabled, * resulting in fuzzy text. Defaults to true. */ public void setSmoothing(final boolean smoothing) { this.smoothing = smoothing; getBackingStore().setSmoothing(smoothing); }
@Override public Object allocateBackingStore(final int w, final int h) { // FIXME: should consider checking Font's attributes to see // whether we're likely to need to support a full RGBA backing // store (i.e., non-default Paint, foreground color, etc.), but // for now, let's just be more efficient TextureRenderer renderer; if (renderDelegate.intensityOnly()) { renderer = TextureRenderer.createAlphaOnlyRenderer(w, h, mipmap); } else { renderer = new TextureRenderer(w, h, true, mipmap); } renderer.setSmoothing(smoothing); if (DEBUG) { System.err.println(" TextRenderer allocating backing store " + w + " x " + h); } return renderer; }