i want to display text with font size 30pt in a JEditorPane with the tag
"<font size="30pt">". But it is not displayed that big. How can i
display the text that big with the font size tag? Is there a limitation
for the size?
Thanks Carina
> i want to display text with font size 30pt in a JEditorPane with the tag
> "<font size="30pt">". But it is not displayed that big. How can i
Just wanting is not enough.
> display the text that big with the font size tag? Is there a limitation
> for the size?
RTFM: http://www.w3.org/TR/html4/present/graphics.html#edef-FONT
size = cdata [CN]
Deprecated. This attribute sets the size of the font. Possible values:
An integer between 1 and 7. This sets the font to some fixed size, whose
rendering depends on the user agent. Not all user agents may render all
seven sizes.
A relative increase in font size. The value "+1" means one size larger.
The value "-3" means three sizes smaller. All sizes belong to the scale
of 1 to 7.
You *can* use the style attribute:
<font style="font-size: 30pt">
Christian
--
And in short, I was afraid.
I took particular interest in this post, since
I have been consulting the c.i.w.a.s groups
recently while updating my sites.
Now, the following test html validates*..
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test Font Size</title>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=iso-8859-1">
</head>
<body>
<p><font size='30pt'>Abc</font>de.</p>
</body>
</html>
Note that if I had not lazily copied the doctype
from another document, it would have read
"3.2", the flavour that a JEP will understand.
If the JEP fails for that html, my guess is that
either the html the OP is supplying is invalid,
or the JEP has a 'maximum size' set internally.
Unfortunately for the OP, I am too lazy to go
checking it further at this instant, but I would
not mind having a look over an sscce..
http://www.physci.org/codes/sscce.jsp
So ..given you (Christian) know about 10 times
as much as I ever want to know about GUI's,
I'll put the question to you.
Did I misunderstand something here, or
did you perhaps get this one wrong?
--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
> Now, the following test html validates*..
>
> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Test Font Size</title>
> <meta http-equiv="CONTENT-TYPE" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> <p><font size='30pt'>Abc</font>de.</p>
> </body>
> </html>
http://www.w3.org/TR/html4/sgml/intro.html#h-19.1
http://www.w3.org/TR/html4/types.html#type-cdata
For some HTML 4 attributes with CDATA attribute values, the specification
imposes further constraints on the set of legal values for the attribute
that may not be expressed by the DTD.
Specifying that the allowed values are 1, 2, 3, 4, 5, 6, 7, +1, +2, +3, +4,
-1, -2 (for usual BASEFONT=3) is not expressible by the DTD.
Christian