RFR: 8246104: Some complex text doesn't render correctly on macOS [v10]
Johan Vos
jvos at openjdk.org
Fri Apr 7 08:35:54 UTC 2023
On Tue, 4 Apr 2023 21:16:49 GMT, Phil Race <prr at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/font/coretext/CTGlyphLayout.java line 83:
>>
>>> 81: if (fr == null) return -1;
>>> 82: slot = fr.getSlotForFont(fontName);
>>> 83: if (slot == -1) {
>>
>> minor: may be `< 0`?
>
> We should never have -2 etc. If we do, then the code will fail and we'd know about it
I noticed checks on either `slot >= 0` or `slot == -1` and was thinking about it as well. But I agree with @prrace , there is not an assignment that could legally result in -2. If that happens, it would be a major failure and we can't pretend it is the same as -1.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1067#discussion_r1160541854
More information about the openjfx-dev
mailing list