On Mon, 25 Mar 2024 23:00:25 GMT, Marius Hanl <mh...@openjdk.org> wrote:
>> modules/javafx.graphics/src/test/java/test/com/sun/javafx/pgstub/StubFontLoader.java >> line 76: >> >>> 74: FontHelper.setNativeFont(font, nativeFont, >>> font.getName(), "Amble LtCn", "Regular"); >>> 75: case "amble light condensed italic" -> >>> 76: FontHelper.setNativeFont(font, nativeFont, >>> font.getName(), "Amble LtCn", "Italic"); >> >> does it make sense to handle/log the default case, or this is indeed the >> desired code (i.e. a no-op)? > > Right now, if we try to load a font that is not known by the test setup, the > font will not have a 'native font' since no branch will get executed. With > that, the width calculation will return 0. > > Just checked the Prism font code, there the code will fallback to the system > font if it can not load the specified font (family). > That would also be an idea here, not sure if it will have consequences on > some tests. Also okay for me. What do you think? I gave the fallback font a shot, since this is closer to the `PrismFontLoader`, which is good when we try to be as close a possible in the tests. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1422#discussion_r1540093962