当前位置: 动力学知识库 > 问答 > 编程问答 >

Java font compatibility

问题描述:

Are logical fonts in Java (Dialog, DialogInput, Monospaced, etc.) compatible with Windows and Macintosh computers? If not, are there any fonts common with both Windows and Macintosh computers?

网友答案:

Logical fonts are the five font families defined by the Java platform which must be supported by any Java runtime environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput.

These logical fonts are not actual font libraries. Instead, the logical font names are mapped to physical fonts by the Java runtime environment. It also depends on the Locale. It is assumed that all the OSs support a different set of fonts, Swing implementors decided to ensure at least these five fonts were supported everywhere.

They will be automatically mapped onto the most suitable font available at a given platform. Have a look at jre/lib/fontconfig.properties.src for details. Will there be common Fonts ? we can not be very sure as the platform specific fonts keep changing on OS revisions ( ex: windows 7/8 and OS X yosemite, Ubuntu etc). As a fall back some fonts are provided with the JRE - take a look at the folder under jre/lib/fonts.

Finally have a look at https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html further details on this.

分享给朋友:
您可能感兴趣的文章:
随机阅读: