jQuery in Action, 2nd edition*
The moose likes HTML, CSS and JavaScript and the fly likes font distortion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "font distortion " Watch "font distortion " New topic
Author

font distortion

Alfonso Harding
Ranch Hand

Joined: Feb 09, 2002
Posts: 35
I'm working on application that uses a servlet to access and output data. Inside the code for the servlet, there is the following:

which controls the fonts for the output. The font colors in IE 5 are fine but the font colors in NN 4.6 browser are not what they should be. Has anybody experienced this problem before and if so what was the fix?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is a HTML and browser problem and not related to Servlets.
I've found that (in general) fonts in Netscape need to be a point bigger than the ones in IE to display.
I have something that defines the exact situation I saw I it, I'll go have a look...
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Righty then, when I tried it, 9pt fonts looked like crap in NS but fine in IE. We had to define the size as 10pt in NS and 9pt in IE.
I hope this helps (or is even relevant)
Dave
Alfonso Harding
Ranch Hand

Joined: Feb 09, 2002
Posts: 35
Thanks Dave, I figured out the problem.. It wasn't the font sizes I was having trouble with but it was the coloring of the words. In IE the color is what it should be, but in Netscape the colors were not. The problem was really an HTML one but it might help those who work with servlets and stylesheets in the future.
in the style sheet I had
h2 {color: "#ffffff"}
but when I changed it to:
h2 {color: #ffffff } w/o the "" marks, the problem was solved even though the first one works with regular html pages.
Thanks for the help anyway. Problem solved.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Moved from Servlets -> HTML and Javascript
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: font distortion
 
Similar Threads
JavaRanch Art
Can't seem to paint on to a Frame.
Terminal Emulator
toString() method
Help on Tag Files - attribute directive.