PHP Classes

File: application/libraries/dompdf/lib/ttf2ufm/src/other/lst.pl

Recommend this page to a friend!
  Classes of harold rita   PHP Thesis Proposal Hub   application/libraries/dompdf/lib/ttf2ufm/src/other/lst.pl   Download  
File: application/libraries/dompdf/lib/ttf2ufm/src/other/lst.pl
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Thesis Proposal Hub
Store and publish research thesis documents
Author: By
Last change:
Date: 6 years ago
Size: 1,589 bytes
 

Contents

Class file image Download
#!/usr/bin/perl # # script to create HTML file with character table # in plain, italic, bold, bold-italic # # see COPYRIGHT # # width of tables $step=16; # commands to enable and disable the font modes # (the fastest changing is first) @matrix = ( [ "Roman", "Italic", "</i>", "<i>" ], [ "Medium", "Bold", "</b>", "<b>" ], [ "Variable", "Fixed", "</tt>", "<tt>" ], ); sub printall { local $i, $j; printf("<table border=\"0\" >\n"); for($j=32; $j<256; $j+=$step) { printf("<tr>\n"); for $i ($j..$j+$step-1) { $c=chr($i); if($c eq "<") { $c="&lt;"; } elsif($c eq ">") { $c="&gt;"; } printf("<td><font color=\"gray\">%03d</font></td><td>\n", $i); printf("<font color=\"white\">%s%s%s</font>\n", $enmode, $c, $dismode); printf("</td>\n"); } printf("</tr>\n"); } printf("</table><p>\n"); } printf("<HTML><HEAD></HEAD><BODY bgcolor=\"black\">\n<font color=\"white\"><p>\n"); for $mask (0.. (1<<@matrix)-1) { #printf("<table><tr>"); $mode = $enmode = $dismode = ""; for $bit (0.. $#matrix) { $val = ($mask >> $bit) & 1; $mode = $matrix[$bit]->[$val] . "<br>" . $mode; if( $val ) { $enmode = $matrix[$bit]->[3] . $enmode; $dismode = $dismode . $matrix[$bit]->[2]; } #printf("=== %d %s %s %s\n", $val, $mode, $enmode, $dismode); } #printf("%x %s %s %s\n", $mask, $mode, $enmode, $dismode); printf("<table border=\"0\"><tr><td>\n"); &printall(); printf("</td><td valign=top><font size=\"+1\" color=\"yellow\"><b>\n"); printf("%s\n", $mode); printf("</b></font></td></tr></table>\n"); } printf("</font></BODY></HTML>\n");