RFR: 8233177: JTextField's size is computed incorrectly when it contains Indic or Thai characters

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Jan 23 08:23:49 UTC 2024


Existing regression test is failing because textfield height is not as per test's expectation..Seems like the indic character being tried to render is not being loaded (probably because of missing glyphs) leading to 0 preferredSpan from [BoxView](https://github.com/openjdk/jdk/blame/5a74c2a67ebcb47e51732f03c4be694bdf920469/src/java.desktop/share/classes/javax/swing/text/BoxView.java#L545-L552) which is superclass for `i18nFieldVIew`, the field view for Indic characters.
Tried block character in the test which is now being loaded properly leading to correct height..

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

Commit messages:
 - 8233177: JTextField's size is computed incorrectly when it contains Indic or Thai characters

Changes: https://git.openjdk.org/jdk/pull/17528/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17528&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8233177
  Stats: 25 lines in 2 files changed: 13 ins; 4 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/17528.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17528/head:pull/17528

PR: https://git.openjdk.org/jdk/pull/17528


More information about the client-libs-dev mailing list