font puzzle

R

Roedy Green

I have noticed with a TextArea that if I do setFonts on it, it
sometimes gets into a state where the only fonts it recognises are the
basic ones like Dialog Monospaced and Serif. All other font changes
it just ignores, though it does recognize font style and size changes.

Is this a bug or an obscure feature? When I do a getFont on the
TextArea I get the correct font.

I am using win2K.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Roedy Green

I have noticed with a TextArea that if I do setFonts on it, it
sometimes gets into a state where the only fonts it recognises are the
basic ones like Dialog Monospaced and Serif. All other font changes
it just ignores, though it does recognize font style and size changes.

Is this a bug or an obscure feature? When I do a getFont on the
TextArea I get the correct font.

I am using win2K.

this does not happen with Swing and A JTextArea. Presumably the
problem lies with the fact TextArea is a heavyweight with its own Font
mechanism
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
T

Thomas Weidenfeller

Roedy said:
I have noticed with a TextArea that if I do setFonts on it, it
sometimes gets into a state where the only fonts it recognises are the
basic ones like Dialog Monospaced and Serif. All other font changes
it just ignores, though it does recognize font style and size changes.

Is this a bug or an obscure feature? When I do a getFont on the
TextArea I get the correct font.

Feature, it was always the case, and it is documented.

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Font.html

Quote:

Peered AWT components, such as Label and TextField,
can only use logical fonts.

/Thomas
 
R

Roedy Green

Peered AWT components, such as Label and TextField,
can only use logical fonts.

Happily though Canvas's don't have that restriction. I have written
my own TextArea that accepts any font. The catch is, it does not
understand copy/paste.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
T

Tim Tyler

Roedy Green said:
I have written my own TextArea that accepts any font. The catch is, it
does not understand copy/paste.

It's always seemed like a bit of a farce that unsigned Java applet
components can't write to the clipboard - even if the user has just
pressed Ctrl-C and you have the input focus - and can't read from the
clipboard - even when the user has just pressed Ctrl-V and you have the
input focus.

I figure these actions - if performed by the user - should trigger "copy"
and "paste" events.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top