Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4155852
Votes 2
Synopsis Font("Arial Narrow MT", Font.BOLD+Font.ITALIC, 12) rendered PLAIN
Category java:classes_2d
Reported Against 1.2 , 1.2beta4
Release Fixed 1.3(kestrel)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4208398
Submit Date 09-JUL-1998
Description
> 1. Many of the fonts do not respond to style and size changes and many of the 
> fonts do not register at all.  For example, if you already have Arial and then 
> you choose Arial Narrow and press Render, the string doesn't change.  Do you 
> think that this problem might be particular to the font?  Some common fonts do 
> work, like Helvetica. -Jennifer Ball

It looks like the mapping of font styles to font names is broken for some of the fonts.  There is a 'Arial Narrow MT Bold Italic' font so when specifying 
Font("Arial Narrow MT", Font.BOLD + Font.ITALIC, 12), I would expect to see Bold and Italic text, but the text is rendered plain.  A getAllFonts() call shows this info :

Arial Narrow MT, family=Arial Narrow MT
Arial Narrow MT Bold, family=Arial Narrow MT
Arial Narrow MT Bold Italic, family=Arial Narrow MT
Arial Narrow MT Italic, family=Arial Narrow MT

So the bold + italic style is there for Arial Narrow MT.  To reproduce compile and run the attached program.

Solaris 2.6, beta4-K build.
Work Around
N/A
Evaluation
only intrinsic family names can have styles applied, others names from getAllFonts are final, and applied styles are ignored.
You can apply styles to: monospaced, serif, sansserif, dialog, dialoginput, etc.
  xxxxx@xxxxx   1998-07-15
Comments
  
  Include a link with my name & email   

Submitted On 07-JUN-1999
govindk
I want to know that if there is some custom made TRUE TYPE FONT.
Will it work?
I will soon try and give my comment on it. 
If someone has already tried then please let me know.


Submitted On 30-SEP-1999
aleandro
I tested a custom made TTF and it worked.


Submitted On 12-JUN-2000
sweetest
the example contains getFontMetrics().Can you update the code to 1.2 because
getFontMetrics is deprecated.


Submitted On 07-MAR-2001
prateesh
Is There any Specific codes(supported by java) to denote 
each fonts in the system ?


Submitted On 07-MAR-2001
prateesh
Is There any Specific codes(supported by java) to denote 
each fonts in the system 


Submitted On 07-MAR-2001
prateesh
Is There any Specific codes(supported by java) to denote 
each fonts in the system ?


Submitted On 19-MAR-2002
BerndMoos
Can you please state clearly WHAT exactly has been fixed in 
this bug? I am using JDK 1.3.1. on Windows NT. When drawing 
a String with font "Times New Roman", it always comes out 
bold. When drawing a String with font "Courier new", I can 
apply bold or plain face successfully. Neither "Times New 
Roman" nor "Courier New" seems to be an intrinsic family 
name. So why is this working in one case and not in the 
other? Any hints would be GREATLY appreciated.

-- Thomas


Submitted On 27-JUN-2002
myo0107
how can I write like karaoke title,and it can change color 
when I move mouse.


Submitted On 12-SEP-2003
pradeep_s_kumar
The code doesn't work when BOLD & ITALLIC is selected 


Submitted On 11-NOV-2003
FarukMKhan
I am also getting this one. Any way to apply styles
non-intrinsic family names



PLEASE NOTE: JDK6 is formerly known as Project Mustang