gpt4 book ai didi

Java、unicode 和字体

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:43:14 30 4
gpt4 key购买 nike

我查看了 java 文档并在网上搜索了有关 java 对具有特定字体(例如 Monospace)的国际字符的支持的信息,但未能得到明确具体的答案。

java 1.4 和 java 1.5/1.6 之间发生了变化。例如,在 java 1.4 中,如果将 JTextArea 上的字体设置为 Monospace,它将无法处理外来字符(改为获取矩形),但在 java 1.5/1.6 中它似乎工作正常。

是否在任何地方清楚地记录了这些差异/改进的支持?

谢谢

最佳答案

来自 Internationalization Enhancements :

Multilingual Text Rendering

To render multilingual text, using logical fonts, 2D now takes advantage of installed host OS fonts for all supported writing systems. For example, if you run in a Thai locale environment, but have Korean fonts installed, both Thai and Korean are rendered. The JRE now also automatically detects physical fonts that are installed into its lib/fonts/fallback directory and adds these physical fonts to all logical fonts for 2D rendering.

Use of Unicode APIs on Windows

AWT now uses the Unicode APIs on Windows 2000/XP. As a result, some of its components can handle text without being restricted by Windows locale settings. For example, AWT text components can accept and display text in the Devanagari writing system regardless of the Windows locale settings. (emphasis mine)

关于Java、unicode 和字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/141859/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com