开发者

How to implements a Font Manager's "install / load a font" in Java

I am on a Font Manager Java project. Now I want to implement the "install Font" functionality in it. Installing a font, in my understanding, is to copy or move a third party font into the system directory such as Windows/Fonts in Windows.

When I used the normal Java copy routine for this job, however, I received "Access Denied" e开发者_高级运维xception since the destination is a system directory.

The questions are, first, can anyone verify my understanding about "installing a font"? And how do we implement "installing a font" in Java?


This is platform-dependant and requires some privileges, so Java is not the best solution.


It seems that you can use java.awt.Font.createFont() methods...I hope it helps...

Please refer to http://download.oracle.com/javase/tutorial/2d/text/fonts.html


On Windows, it is not just copying the font into the directory (like it seems when doing this in explorer), but also calling some registration functions to register the font.


Cross posted http://forums.oracle.com/forums/thread.jspa?threadID=2188576

db

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜