RFR: 8165943: LineBreakMeasurer does not measure correctly if TextAttribute.TRACKING is set. [v4]

Phil Race prr at openjdk.org
Tue Dec 6 23:23:59 UTC 2022


On Tue, 6 Dec 2022 23:06:25 GMT, Olga Mikhaltsova <omikhaltcova at openjdk.org> wrote:

>> test/jdk/java/awt/font/LineBreakMeasurer/LineBreakWithTracking.java line 50:
>> 
>>> 48: 
>>> 49:   private float textTracking = 0.0f;
>>> 50:   private static String fontName = "Bitstream Cyberbit";
>> 
>> Did you previously use this font ? I must have over-looked that.
>> Do not use fonts that aren't available on the OS .. no SQE person will ever install - or even know a test uses it - and JDK will just use Dialog instead and people will get confused over why their experience is different than yours.
>> And of course each OS (desktop) will have different fonts. Overall best to just pick a logical font. If you want to know if the font supports all your code points you can iterate over your text using Font.canDisplay(int codePoint)
>> 
>> I'll submit a test job using your automated test.
>
> I noticed the usage of this font "Bitstream Cyberbit" in TestJustification.java that was added by you. I used the test string from there because it includes Latin, Arabic, CJK and Hebrew. "Bitstream Cyberbit" has all nessesary symbols used in the test string. At the moment I have no idea what font I can use instead.

I'm pretty sure it wasn't me who created that.
I may have updated it at some point (actually I suspect what you see is that I moved
it from closed to open) but that test was created by someone else 23 years ago (1999).
Different world back then. Likely it should not use the font either.

Your best best is to use Dialog. On all platforms where a decent set of fonts is installed then all those scripts will be supported by Dialog.

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

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



More information about the client-libs-dev mailing list