On Tue, 18 Apr 2000, Del wrote:
> Quoting Rick Welykochy <[EMAIL PROTECTED]>:
>
>
> > I have found a solution: on dynamic sites I create,
> the font size
> > for conceptual sizes like small,normal,medium,etc
> fontsize is based
> > on what I find in the HTTP_USER_AGENT environemnt
> variable.
>
> And some sample code to do that would be ... ???
in perl: "fs" means "font size" for use in a font tag:
sub tinyfs { $ENV{HTTP_USER_AGENT} =~ /win/i ? "0" : "-2" }
sub smallfs { $ENV{HTTP_USER_AGENT} =~ /win/i ? "1" : "-1" }
sub normalfs { $ENV{HTTP_USER_AGENT} =~ /win/i ? "2" : "+0" }
sub mediumfs { $ENV{HTTP_USER_AGENT} =~ /win/i ? "3" : "+1" }
sub largefs { $ENV{HTTP_USER_AGENT} =~ /win/i ? "4" : "+2" }
The above font sizes were chosen as basically equivalent
in size on the same monitor. Thus, to generate a largish title:
my $titlefonttag = "<font size=".largefs.">";
:
my $title = "${titlefonttag}This is a Big Title</font>";
and voila ... $title displays approx same size in
Windoze and other browsers.
-rickw
--
Rick Welykochy || Praxis Services
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text