Solved

Display Custom fonts in Java applets

Posted on 1997-08-18
1
328 Views
Last Modified: 2013-12-02
Is it possible to draw with a custom font in a
Java applet? Is there any classes in the Java JDK which I should use to implement this?
0
Comment
Question by:ytcheung
1 Comment
 

Accepted Solution

by:
dsnider earned 100 total points
ID: 1225269
There is no class to draw a font, or to import some sort of custom font.  (You have to write your own).

One method I used (that worked reasonably well), was to load
a gif image of a font, slice it up into pieces, and treat each
character of the font as a different image.
(Read up on PixelGrabber.)

I took it one step further, and make 16 copies of the font, and put them through a ColorMaskFiler to have the standard 16 ANSI colors.

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now