RFR: 8154177: Font spacing is incorrect at 125% or 150% scaling on Windows

Phil Race philip.race at oracle.com
Fri Apr 15 22:39:29 UTC 2016

The problem is in GlyphCache.render(..)

  pt.setLocation(x + gl.getPosX(gi), y + gl.getPosY(gi));

             int subPixel = strike.getQuantizedPosition(pt);
             GlyphData data = getCachedGlyph(gc, subPixel);
             xform.transform(pt, pt);
                 addDataToQuad(data, vb, tex, pt.x, pt.y, dstw, dsth);

That call to getQuantizedPosition() is doing rounding
before we have the final device space.

The fix is to move the transform to before the call to 

This makes the test look much better. TextTest was also used to verify that
everything behaves well under scales and rotates.

Bug : https://bugs.openjdk.java.net/browse/JDK-8154177
Webrev: http://cr.openjdk.java.net/~prr/8154177/


More information about the openjfx-dev mailing list