I came across a very strange behavior of Java Graphics2D draw String.
If I give a font name like
Font f = new Font("Helvetica", Font.PLAIN, 10);
Then, on the device’s screen, the first call to g2D.drawString can take up to 600 ms. This creates a screen jam, it is not important, but rather annoying.
Switching the font name to the default values, such as "Monospace", will solve the problem.
Has anyone encountered similar problems?
source
share