JDK-8101932 : Switch to glyph-based text rendering
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2012-09-06
  • Updated: 2015-06-16
  • Resolved: 2013-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
We currently use code points as glyph codes for rendering purposes which leads to numerous rendering issues. Once Prism has glyph rendering API we should switch to it.
Comments
I think it is worth declaring com.sun.javafx.webkit.prism.TextUtilities class final and com.sun.javafx.webkit.prism.TextUtilities methods package private.
31-01-2013

Pushed with Vasiliy's suggested changes: http://jfxsrc.us.oracle.com/javafx/8.0/scrum/graphics/rt-closed/rev/f33b53ad2727 http://jfxsrc.us.oracle.com/javafx/8.0/scrum/graphics/webnode/rev/aacbbfa61865
31-01-2013

Fix was slightly modified after Felipe's comments. I've simplified TextUtilities.createLayout() and added a new method TextUtilities.createGlyphList() which is called from WCGraphicsPrismContext. Class TextLine is no longer used. http://javaweb.us.oracle.com/jcg/fx-webrevs/RT-24772/2
28-01-2013

Suggested fix: http://javaweb.us.oracle.com/jcg/fx-webrevs/RT-24772/1 Summary of changes: - GlyphPage::fill() now simply passes characters array to Java where they are fed to CharToGlyphMapper. The rest of the method is rewritten after Chromium; - Methods in WCFontImpl that work with complex scripts were rewritten using TextLayout. getStringLength() was renamed getStringWidth(); - WCGraphicsPrismContext.drawString() renders GlyphLists instead of Strings.
22-01-2013

Parts of RT-24327 should be rolled back once this is fixed, in particular the typedef in Glyph.h.
06-09-2012