Using greyscale AA+FM mode this can pretty closely emulate the present FX 2.0 rendering
and works even for some modes like justification and tabs since Prism graphics breaks up the
rendering for these cases into separate drawString calls
But as we add support for additional attributes beyond font and style, specifically ligatures,
kerning, superscripts, or rendering behaviours such as sub-pixel positioning, it may become
increasingly difficult to ensure that glyphs are similarly positioned in both cases. This can affect layout since
all measurement is done on the prism side. We can mitigate this by adding code to set these
as attributes on the Java 2D font. but this relies on them behaving equivalently. It might be
best to simply let prism tell 2D exactly where to draw each glyph. Also strokes and effects applied to glyph
images may not align. And for fallback and logical fonts we likely already have substantial differences.
What is needed is apparently a drawGlyphVector type of API where prism assigns the AA modes
and precise glyph positions of each glyph, and 2D just does the blitting where its told.
This alone doesn't help the fallback/logical composite font differences. That will need a way to
extract the physical font used for each glyph run and break it up into multiple drawGlyphVector calls.
Although this is phrased in a way that suggests a new API on prism graphics, it may be that
ends up as some utilities used only in prism-j2d but provided as part of the core prism test
engine to extract the information needed by prism-j2d.
There may be additional complications or requirements but these are the ones that come to mind.
- blocks
-
JDK-8114707 HTMLEditor: characters 'jitter' during text selection
-
- Resolved
-
-
JDK-8128600 HTMLEditor Justify button does nothing
-
- Resolved
-
-
JDK-8116812 HTMLEditor: text selection has 'gaps' when fonts are different
-
- Closed
-
-
JDK-8120787 Justify text alignment works poorly in WebNode
-
- Closed
-
-
JDK-8127584 WebView does not support rendering surrogate pair charcter
-
- Closed
-
-
JDK-8101932 Switch to glyph-based text rendering
-
- Resolved
-
- duplicates
-
JDK-8114607 Tab isn't handled properly in text areas
-
- Closed
-
-
JDK-8101391 An extension in Graphics interface for glyph-base text drawing.
-
- Closed
-
- relates to
-
JDK-8127490 Google Docs editing issues
-
- Resolved
-