On Fri, 2 Apr 2021 19:47:30 GMT, mstr2 <github.com+43553916+ms...@openjdk.org> 
wrote:

> This PR fixes incorrect parsing of mnemonic symbols in the following cases:
> 1. an escaped double underscore incorrectly shows up as a double underscore 
> in displayed text
> 2. an extended mnemonic incorrectly removes a part of adjacent text
> 
> As a side effect, this PR also fixes another undocumented issue for multiline 
> text where text metrics calculations incorrectly operate on text for which 
> mnemonic symbols have not been processed.
> 
> This can lead to a glitch where the mnemonic underscore makes a text just 
> long enough to wrap to a new line, but when the text is rendered, the second 
> line shows up entirely empty. The reason for this is that for rendering, the 
> text is laid out _after_ mnemonic symbols have been removed.
> 
> The solution is to _always_ use processed text ("_clean text_") when laying 
> out text.

This looks good to me, although I have never used extended mnemonics, so don't 
know how to test them. The rest is fine (and the visual display of the extended 
mnemonics is fine as long as elided the parenthesized char is the right thing 
to do). I also verified that the new tests fail without the fix and pass with 
the fix.

-------------

PR: https://git.openjdk.java.net/jfx/pull/453

Reply via email to