Solved

Display Custom fonts in Java applets

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Spring Framework HTTPSession management 1 36
MySQL  on Tomcat 8 47
SHA2 certs for IIS AND Java? 2 94
Crystal Reports Licensing Questions 4 12
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

803 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