This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Font.deriveFont() having no effect?

 
Greenhorn
Posts: 18
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to load a font from a file, and then make it larger using . I then setFont(someFont); on all my JButtons.
My question is, why does it seem to stay at a tiny 1pt size?
If it may be of any help, it's in an undecorated JFrame that I used in setFullScreenWindow(), and it's a custom font I made.
Thanks
[EDIT] Oops, got it.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dan,
you said:

and it's a custom font I made

. Try to pick up another font file from your computer by search for *.ttf or post the ButtonFont.ttf so we can look into it and make some test.
It may be the file is corrupt or does not comply with the standard tff file.
How did you creat the "ButtonFont.ttf" ?

If you use a well known font file from you computer do you encount the same issue.

 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic