How do you enable anti aliasing in arbitrary Java apps?

后端 未结 4 1179
暗喜
暗喜 2020-11-27 11:32

Many Java Apps don\'t use anti-aliased fonts by default, despite the capability of Swing to provide them. How can you coerce an arbitrary java application to use AA fonts?

4条回答
  •  猫巷女王i
    2020-11-27 11:43

    For the record, I have found out that in my windows 7 machine,

    • If I don't use this in my code, I get the nice ClearType subpixel rendering.
    • But if I use this, I get the classical black-and-white antialiasing which is much uglier.

    So this code should be used carefully. I guess it will stop being needed at all when all Linux users have updated to the versions of OpenJDK that handle aliasing well by default.

提交回复
热议问题