On Sun, 25 Apr 2021 20:53:11 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> Would it be better to use isBlank() instead of isEmpty() to check a font >> family name is blank? >> >> if (family.isBlank()) { >> return false; >> } > > I think so. I changed the test SampleBow font family name to one space [SampleBowOneSpaceFamilyName.ttf](https://bugs.openjdk.java.net/secure/attachment/94402/SampleBowOneSpaceFamilyName.ttf) and to two spaces [SampleBowTwoSpacesFamilyName.ttf](https://bugs.openjdk.java.net/secure/attachment/94403/SampleBowTwoSpacesFamilyName.ttf) The PrintFontSample sample program properly prints text drawn by Graphics2D.drawString() and Graphics2D.drawGlyphVector() on Windows with jdk 16 with these two fonts. It looks like the problem is only with selecting a font in GDI with empty font family name. ------------- PR: https://git.openjdk.java.net/jdk/pull/3631