Pregunta

I'm making a program that should be as platform independent as possible. I'm using the Nimbus LAF.

I was wondering, should I be worried about fonts? Is it's default font included in the LAF itself or does it fetch it from the platform?

¿Fue útil?

Solución

It's a default non-system font.

If you have a frame, and you add this line after frame.setVisible(true):

System.out.println("Font: "+frame.getFont().getName());

It should print Font: Dialog which is not a system font. So it should be a proprietary cross-platform font.

So, to answer your question:

Should I be worried about fonts?

No, unless:

  1. You use the system look and feel, which uses the system default font
  2. You use another look and feel which uses the system default font
  3. You use a custom font (a custom system font, because if you load a font you saved in the application resources it won't be a problem)

If you are doing none of the three listed above, you should be safe.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top