RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2]

Dmitry Batrak dbatrak at openjdk.java.net
Tue Feb 1 21:40:53 UTC 2022


> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that
> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field
> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be
> 'created' fonts anymore, to preserve their `Font2D` handle.
> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created
> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and
> deserialization.

Dmitry Batrak has updated the pull request incrementally with one additional commit since the last revision:

  remove 'headful' requirement from test case

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7313/files
  - new: https://git.openjdk.java.net/jdk/pull/7313/files/357ffd0c..e3fa744a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7313&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7313&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7313.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7313/head:pull/7313

PR: https://git.openjdk.java.net/jdk/pull/7313



More information about the client-libs-dev mailing list