Solved

Display Custom fonts in Java applets

Posted on 1997-08-18
1
339 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 120
check java version using powershell 13 177
pagenation logic how it is working in my code 1 54
Bot application - advice 3 38
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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

828 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