Lee Jenkins wrote 12 lines
Hi everyone,
I am curious as to what others do in the case of applications that must be
portable between Windows and Linux regarding fonts.
The specific font that is actually used doesn't matter to me as long as its
readable and well rendered.
Just looking for suggestions,
Thank you,
Hi,
I had this problem recently while developing a Java applet. I used many advanced Unicode characters (mainly math symbols) in it and later, some users (mainly Windows users and some not up-to-date Linux users) reported that a lot of symbols where not shown correctly. Also, the width of my applet was a fixed constant and on some machines the font was much wider than on others and the Labels didn't fit anymore on the form. I also used sometimes a mono-spaced font and sometimes a normal font. There were even more problems with the mono-spaced font which seems to support even less characters on some systems.
I first tried around to give some special system dependent rules for an individual choice of the font. After a lot of tries, I came to the conclusion, that this is just not a good idea and there will always be some systems which have some problems.
In my case, I was restricted in the choice of the font also because I need a lot of these advanced Unicode characters. If you just need the normal Latin characters and nothing more, it's probably easier. But you should design your application in a way that it will work however the size of the actual font is.
For my problem, I just came to the conclusion to distribute a font together with the Java applet. The applet just loads this font and doesn't use any system , I had further problems to find a font which can display all of my needed characters. Normally, if you use the system fonts, there are special mechanisms that if a font doesn't support a individual character, the system will use automatically another similar font. I first figured this out while I was loading the ttf file directly.
I am using the free font DejaVu now which supports all my wanted characters.
Regards,
Albert