dcsimg
A servelet sends a font object to a Applet however, the font object is changed once sent over network? from myfont type to dialog type
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dirre_barre
Posted On:   Friday, May 24, 2002 04:35 AM

Hi everybody I have a big problem that I tried to solve the last few days without any luck. I have an a servlet that creates a dynamic font as Font f = createFont(truetypefont,in ); etc however once the font is send back to the applet the class type of the font is changed to dialog when it is supposed to be myfont type before sending the objecet: java.awt.Font[family=myfont,name=myfont,style=plain,size=52] on clint side it is java.awt.Font[family=dialog,name=myfont,style=plain,size=52] I changed the applet to be an application receiving the font and somehow when the font object is received at the client    More>>

Hi everybody
I have a big problem that I tried to solve the last few days without any luck.
I have an a servlet that creates a dynamic font
as

			
Font f = createFont(truetypefont,in );
etc

however once the font is send back to the applet
the class type of the font is changed to dialog
when it is supposed to be myfont type

			
before sending the objecet: java.awt.Font[family=myfont,name=myfont,style=plain,size=52]

on clint side it is
java.awt.Font[family=dialog,name=myfont,style=plain,size=52]



I changed the applet to be an application receiving the
font and somehow when the font object is received at the client side it seems to be trying to find the physical font under the jre/lib/fonts. If the myfont.ttf is there the application can display the font correctly if I remove then it can not display the my custom font.


however when it is an applet it can not read anything on the local machine so it never try's to look in
the jre/lib/fonts directory so it never finds myfont.ttf


As far I have understand with 1.3 jre u do not need have the physical font (myfont.ttf) available at the client side
that is the whole point it being dynamic or am I very wrong. and I do cant have it installed on every client anyway...

What am I doing is wrong? I am using 1.4.0 jre for the applets...


please if anyone can give a simple idea what I should do?
DO I need to change the font.properties file if so how?
But again I read u should not need to that?

Thanks

   <<Less
About | Sitemap | Contact