title: What can cause java.awt/java.swing to not render fonts/text?
body: <p>I have some java code that I am trying to interface with from a flutter application (in-process) using the jvm from a native plugin. The problem that I'm having occurs specifically under Linux with flutter- it is not displaying/rendering any text on the java ui components e.g. button labels, text in text-fields.</p>
  <p>When I run this code under windows or when I run java code directly with Linux everything seems to be as intended. This suggest this bug is very specific to flutter/linux combination.</p>
  <p>I've created an issue at the flutter repository <a href="https://github.com/flutter/flutter/issues/105824" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/105824</a> to cover some more details with a sample application.</p>
  <p>I've tried following the awt debug tips outlined on <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/awt001.html" rel="nofollow noreferrer">https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/awt001.html</a></p>
  <ul>
  <li>Configured the loggers to capture any messages of warning or higher</li>
  <li>Configured the uncaught exception handler</li>
  <li>Configured the sub.awt.noisyerrorhandler</li>
  </ul>
  <p>I'm wondering if there's anything that could explain this behavior? None of above have really given me any insights.</p>
  <hr />
  <p>Edit:</p>
  <p>One of the things that seemed off to me is that the focus rectangle isn't computing it's dimensions. This made me question if the problem is on the java side.</p>
  <ul>
  <li>A JButton dervives from JAbstractButton which derives from JComponent</li>
  <li>The ui of JComponent seems mostly drawn by ComponentUI - in case of JButton this would be BasicButtonUI</li>
  <li>so somewhere around this line it means <a href="https://github.com/openjdk/jdk17/blob/74007890bb9a3fa3a65683a3f480e399f2b1a0b6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java#L338" rel="nofollow noreferrer">https://github.com/openjdk/jdk17/blob/74007890bb9a3fa3a65683a3f480e399f2b1a0b6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java#L338</a> the rectangle doesn't have measurements.</li>
  <li>Haven't gotten any further as this yet.</li>
  </ul>