On Wed, 1 Oct 2025 18:41:00 GMT, Sergey Bylokhov <[email protected]> wrote:

>> Do you know when that might happen? This code gets its values (after a few 
>> layers of abstraction) from 
>> `StandardGlyphVector$GlyphStrike.getGlyphOutlineBounds(int, float, float)`, 
>> which has a similar `isEmpty` check.
>
> I am not sure if it is possible, but I would like to make sure we did not 
> introduce any issues, since isEmpty() will skip ‘flipped’ bounds.

I think the main thing is that the condition which adds the "aggregate" 
position to the glyph bounds is the same condition which later undoes this and 
converts the position back to the "single glyph" position. The code which adds 
the total advance the glyph position uses `isEmpty`, so I think the code which 
undoes it (the code being added in this PR) needs to use it as well:

https://github.com/openjdk/jdk/blob/76dba201fa1a525780677e4d3dee8e9ffafd1cd7/src/java.desktop/share/classes/sun/font/StandardGlyphVector.java#L1798

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27580#discussion_r2403986158

Reply via email to