-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
Fix Understood
-
x86
-
windows_xp
Name: gm110360 Date: 08/25/2004
FULL PRODUCT VERSION :
jdk 1.5 beta 2
ADDITIONAL OS VERSION INFORMATION :
windows XP
A DESCRIPTION OF THE PROBLEM :
According to the description in bug #4390880, type1c fonts are supported in 1.5.
This is incorrect. Type1 fonts work fine, but Type1C fonts do not.
Type 1C fonts are very common in document processing as they are used extensively with PDF files.
It should be possible to use the TYPE1_FONT constant, but maybe a TYPE1C_FONT constant would be better?
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
use provided test case with Type1C font
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the font should be created
ACTUAL -
an exception is thrown
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.awt.FontFormatException: bad pfa font
at sun.font.Type1Font.verifyPFA(Type1Font.java:258)
at sun.font.Type1Font.verify(Type1Font.java:236)
at sun.font.Type1Font.<init>(Type1Font.java:120)
at sun.font.FontManager.createFont2D(FontManager.java:1460)
at java.awt.Font.<init>(Font.java:437)
at java.awt.Font.createFont(Font.java:744)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.io.*;
public class TestFont {
public static void main(String[] args) throws FileNotFoundException, FontFormatException, IOException {
Font awtFont = Font.createFont(Font.TYPE1_FONT, new FileInputStream ("testfont.pfa"));
}
}
---------- END SOURCE ----------
(Incident Review ID: 300788)
======================================================================