up vote 0 down vote favorite
share [g+] share [fb]

I have a dfont mac font file I'd like to use in a java program which runs on a linux box (CentOS release 5.3). Is that at all possible?

I used fondu to extract the ttf files from the dfont file and copied the ttf to the linux box. In Java I read this file and try to use it, but get the error

java.awt.FontFormatException: Font name not found
 at sun.font.TrueTypeFont.init(TrueTypeFont.java:437)
 at sun.font.TrueTypeFont.<init>(TrueTypeFont.java:154)
 at sun.font.FontManager.createFont2D(FontManager.java:1476)
 at java.awt.Font.<init>(Font.java:454)
 at java.awt.Font.createFont(Font.java:761)

If I use other ttf files that's OK, the java program can read the fonts just fine. If I run the same java program on a mac box that's also fine, the ttf extracted by fondu from the dfont files are read successfully. I tried downloading just random ttf files from the net and use them on the linux box and that went well. It's just the ttf files that I extract from the dfont files that are giving me hard time, so I was thinking, maybe I'm not doing it right?

I first posted a question here http://stackoverflow.com/questions/1550312/font-name-not-found-on-linux but I think this is more of a system question than a programing one.

link|improve this question
Maybe fondu has problems extracting ttf fonts from dfont files. Compatibilily between fonts in different OSes is usually tricky. – alex Oct 13 '09 at 11:33
feedback

3 Answers

I would try a better converter, but if it's a commercial font then there may be licensing issues as well.

link|improve this answer
feedback

I tried several converters (fondu, fontforge) and none of them did the job. On the mac I'm able to read the extracted ttf file, but not on the linux box. I've also tried extracting a ttc (true type collection) version of the dfont but still no good. My designer friend tried to help, also extracting the fonts, but still not good. I suppose there's something in the way font are treated that's different b/w OSes. Finally, I downloaded a font from the net that was ttf to begin with and that did the trick :)

link|improve this answer
feedback

try http://onlinefontconverter.com/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.