On Wed, 17 Mar 2021 10:45:00 GMT, Dmitry Batrak <dbat...@openjdk.org> wrote:
>>> What kind of test are you having in mind? I can extend the added >>> MacEmoji.java test, that will check that 'something' is painted to >>> different types of BufferedImage-s and/or with transforms applied. Or you >>> want me to add a manual test case? >> >> The automated tests will be enough, not sure about 'something is painted' >> however, it is better to check that it works. > > @mrserb I don't know how to check automatically that glyph painting works > correctly. Could you please suggest a way to do it? In JetBrains Runtime we > have a test that checks that rendered emoji glyph matches one of stored > 'golden images', but I don't think that's suitable for OpenJDK, unless > someone will volunteer to update that list when the need arises (e.g. when > newer version of macOS changes the font, or rendering details). At the > moment, we have already 7 golden images for a single glyph in our repository. You the current image from the MacEmoji test as a golden image for other formats/transforms/extraalpha/etc. For example, if DST type is changed then it is unlikely the shape of the emoji will be changed as well, or if it is too big/ too small. BTW It will be good if the test will fail on the current metal implementation. ------------- PR: https://git.openjdk.java.net/jdk/pull/3007