简体   繁体   English

Java字体兼容性

[英]Java font compatibility

Are logical fonts in Java (Dialog, DialogInput, Monospaced, etc.) compatible with Windows and Macintosh computers? Java 中的逻辑字体(Dialog、DialogInput、Monospaced 等)是否与 WindowsMacintosh 计算机兼容? If not, are there any fonts common with both Windows and Macintosh computers?如果没有,是否有 Windows 和 Macintosh 计算机通用的字体?

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.逻辑字体是由 Java 平台定义的五个字体系列,任何 Java 运行时环境都必须支持它们:Serif、SansSerif、Monospaced、Dialog 和 DialogInput。

These logical fonts are not actual font libraries.这些逻辑字体不是实际的字体库。 Instead, the logical font names are mapped to physical fonts by the Java runtime environment.相反,Java 运行时环境将逻辑字体名称映射到物理字体。 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.假设所有操作系统都支持不同的字体集,Swing 实现者决定确保至少在任何地方都支持这五种字体。

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.有关详细信息,请查看jre/lib/fontconfig.properties.src 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).我们不能非常确定,因为平台特定字体在操作系统修订版(例如:windows 7/8 和 OS X Yosemite、Ubuntu 等)上不断变化。 As a fall back some fonts are provided with the JRE - take a look at the folder under jre/lib/fonts .作为后备,JRE 提供了一些字体 - 查看jre/lib/fonts下的文件夹。

Finally have a look at https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html further details on this.最后看看https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html进一步的细节。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM