Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2005, 01:58 PM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to smshinde
Default Using font created by createFont(int, InputStream)

Hello,
I have created a font using a TTF font file as follows:

FileInputStream fis = new FileInputStream("font.ttf"]);
f = Font.createFont(Font.TRUETYPE_­FONT, fis);

If I create instance of this font and apply this to a textfield using
setFont method,the displayed text in the text field is too small that
we cant see it (this is not matter with a label).
If we apply the method deriveFont(int size) to font before passing it
to setFont and giving a large value of size, it won't work and we can't
see it. The text displayed to toooo small.
How to overcome this problem? Any suggestions?
-Sameer





Similar Threads
Thread Thread Starter Forum Replies Last Post
Buffers, InputStream & ByteArrayOutputStream erobb BOOK: Beginning Java 2 0 March 21st, 2008 01:01 AM
int? asn187 C# 2 March 30th, 2007 06:05 AM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
how can I get the int value from Session[" "] iaarm88 Classic ASP Databases 2 February 8th, 2005 03:38 AM
InputStream and OutputStream in javascript?? bikash Javascript 3 July 25th, 2003 05:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.