#!/usr/bin/perl use strict; use warnings; use CGI; use HTML::Entities qw(encode_entities); print "content-type: text/html \n\n"; my @options = qw(text color background_color); my @family = qw(serif sans-serif cursive fantasy monospace); my @size = qw(xx-small x-small small medium large x-large xx-large); my @weight = qw(normal bold 100 200 300 400 500 600 700 800 900); my @variant = qw(normal small-caps); my @style = qw(normal italic oblique); my $cgi = CGI->new(); my $text = encode_entities($cgi->param('text')) || "The quick brown fox jumps over the lazy dog."; my $color = encode_entities($cgi->param('color')) || "#000"; my $background_color = encode_entities($cgi->param('background_color')) || "transparent"; print <<"sec1"; Font and Color Tests

Font and Color Tests

sec1 for my $option (@options) { my $display_option = ucfirst $option; $display_option =~ tr/_/ /; print qq{
\n\n\n
}; } print <<"sec2";
Start over
sec2 for my $style (@style) { for my $variant (@variant) { for my $weight (@weight) { for my $size (@size) { for my $family (@family) { print qq{

style: $style; variant: $variant; weight: $weight; size: $size; family: $family; color: $color; background-color: $background_color;

\n}; print qq{

$text

\n}; } } } } } print "";