Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Packaging Fonts?

 
Alex English
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm building my application on Linux, and I'm having trouble displaying a font that does not look terrible. The default system fonts do not seem to show up. I have been able to get it to work if I package an actual font ttf file into the jar, and then load the font from the jar.

My question is, am I breaking a rule? Is it ok to package a font that is not of my own creation? If so, should I add a note describing the license of the font? It's not a fancy font, just arial.

Thanks
 
Lucy Hummel
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alex,

That sounds as a hack. I do not have a clue what went wrong. But I would not supply that hacking jar.

How did you set up the default look and feel? Did you call:
 
Petr Hejl
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you would break the rule. IMHO the trouble is somewhere in you linux font configuration.

In addition I think that the fonts are something you can't easily get and distribute - somebody spent a lot of time creating it.
 
Romeo Son
Ranch Hand
Posts: 92
Android Eclipse IDE Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alex,

If you look in the API documentation for the Font class, you will see:

Logical fonts are the five font families defined by the Java platform which must be supported by any Java runtime environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput.


Why don't you use one of them instead of Arial?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic