diff options
author | dscho <dscho> | 2001-10-05 20:19:35 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-10-05 20:19:35 +0000 |
commit | 8f407f8a1ab2adf08c438f40cd797fef8a810dae (patch) | |
tree | 999aab5a3f788f5c6e43621525fdf6515f6bb974 /bdf2c.pl | |
parent | 48eb9b22c7097c4af61760ce3fdc7f5135e657bc (diff) | |
download | libtdevnc-8f407f8a1ab2adf08c438f40cd797fef8a810dae.tar.gz libtdevnc-8f407f8a1ab2adf08c438f40cd797fef8a810dae.zip |
extracted font routines from example
Diffstat (limited to 'bdf2c.pl')
-rw-r--r-- | bdf2c.pl | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -7,13 +7,16 @@ for($i=0;$i<256*5;$i++) { $out=""; $counter=0; +$fontname="default"; $i=0; $searchfor=""; $nullx="0x"; while(<>) { - if(/^ENCODING (.*)$/) { + if(/^FONT (.*)$/) { + $fontname=$1; + } elsif(/^ENCODING (.*)$/) { $glyphindex=$1; $searchfor="BBX"; } elsif(/^BBX (.*) (.*) (.*) (.*)$/) { @@ -36,9 +39,10 @@ while(<>) { } } -print "unsigned char bdffontdata[$counter]={\n" . $out; -print "};\nint bdffontmetadata[256*5]={\n"; +print "unsigned char " . $fontname . "FontData[$counter]={\n" . $out; +print "};\nint " . $fontname . "FontMetaData[256*5]={\n"; for($i=0;$i<256*5;$i++) { print $encodings[$i] . ","; } -print "};\n"; +print "};\nrfbFontData " . $fontname . "Font={" . + $fontname . "FontData, " . $fontname . "FontMetaData};\n"; |