summaryrefslogtreecommitdiffstats
path: root/bdf2c.pl
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2011-03-29 16:43:02 +0200
committerChristian Beier <dontmind@freeshell.org>2011-03-29 16:43:02 +0200
commiteeafad20bfbc4ff3728f02016d354ec28df01068 (patch)
tree9a9ea3061722b56e52bf098b4089c917e1dea5d1 /bdf2c.pl
parentc0e3fa40543a5de50c46ab436593479daf584870 (diff)
downloadlibtdevnc-eeafad20bfbc4ff3728f02016d354ec28df01068.tar.gz
libtdevnc-eeafad20bfbc4ff3728f02016d354ec28df01068.zip
Add a git-log to GNU-Style ChangeLog converter script.
Also put all helper scripts into a utils directory.
Diffstat (limited to 'bdf2c.pl')
-rw-r--r--bdf2c.pl60
1 files changed, 0 insertions, 60 deletions
diff --git a/bdf2c.pl b/bdf2c.pl
deleted file mode 100644
index fc43712..0000000
--- a/bdf2c.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/perl
-
-@encodings=();
-for($i=0;$i<256*5;$i++) {
- $encodings[$i]="0";
-}
-
-$out="";
-$counter=0;
-$fontname="default";
-
-$i=0;
-$searchfor="";
-$nullx="0x";
-
-while(<>) {
- if(/^FONT (.*)$/) {
- $fontname=$1;
- $fontname=~y/\"//d;
- } elsif(/^ENCODING (.*)$/) {
- $glyphindex=$1;
- $searchfor="BBX";
- $dwidth=0;
- } elsif(/^DWIDTH (.*) (.*)/) {
- $dwidth=$1;
- } elsif(/^BBX (.*) (.*) (.*) (.*)$/) {
- ($width,$height,$x,$y)=($1,$2,$3,$4);
- @encodings[$glyphindex*5..($glyphindex*5+4)]=($counter,$width,$height,$x,$y);
- if($dwidth != 0) {
- $encodings[$glyphindex*5+1]=$dwidth;
- } else {
- $dwidth=$width;
- }
- $searchfor="BITMAP";
- } elsif(/^BITMAP/) {
- $i=1;
- } elsif($i>0) {
- if($i>$height) {
- $i=0;
- $out.=" /* $glyphindex */\n";
- } else {
- if(int(($dwidth+7)/8) > int(($width+7)/8)) {
- $_ .= "00"x(int(($dwidth+7)/8)-int(($width+7)/8));
- }
- $_=substr($_,0,(int(($dwidth+7)/8)*2));
- $counter+=(int(($dwidth+7)/8));
- s/(..)/$nullx$1,/g;
- $out.=$_;
- $i++;
- }
- }
-}
-
-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 "};\nrfbFontData " . $fontname . "Font={" .
- $fontname . "FontData, " . $fontname . "FontMetaData};\n";