do not mess with high-codepoint quotes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2012 22:21:48 +0000 (22:21 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2012 22:21:48 +0000 (22:21 +0000)
mkrules
specs
update-xfonts-traditional

diff --git a/mkrules b/mkrules
index ea3afeb..5b07879 100755 (executable)
--- a/mkrules
+++ b/mkrules
@@ -70,6 +70,9 @@ while read keyword rest; do
                partial=1
                chars
                ;;
+       verbatim)
+               echo >&3 "    $rest"
+               ;;
        *)
                echo >&2 "??? $keyword"
                exit 1
diff --git a/specs b/specs
index f84ae6d..a705c19 100644 (file)
--- a/specs
+++ b/specs
@@ -2,8 +2,15 @@
 # font data from the bdfs to the rules files, so you may need to
 # update the copyright.
 
-pcf            6x13
-rules          Trad
-partial                a
-entire         [ ] ( ) { } ` ' d42 & W
+pcf                    6x13
+rules                  Trad
+partial                        a
+entire                 [ ] ( ) { } d42 & W
+
+verbatim       if ($props{'CHARSET_REGISTRY'} =~ m/iso8859|utf/i &&
+verbatim           $props{'ENCODING'} <= 127) {
+entire                 ` '
+verbatim       }
+
+
 endrules
index e2fb14f..5e29133 100755 (executable)
@@ -21,6 +21,7 @@ our %foundrymap;
 our $verbose=0;
 our $reportfh;
 our $foundryinfo;
+our %props;
 
 sub reportloaded {
     return unless $verbose;
@@ -55,6 +56,7 @@ sub processbdf ($$$$) {
     my ($foundry,$font);
     my ($w,$h,$xo,$yo,$y,$bitmap,$glyph);
     my $modified=0;
+    %props = ();
     while (<$inbdf>) {
        if ($state eq 'bitmap' && $y==$h) {
            $glyph = uc $glyph;
@@ -97,6 +99,10 @@ sub processbdf ($$$$) {
            $state='startchar';
            $w=undef;
        }
+       if (($state eq 'idle' || $state eq 'startchar') &&
+           m/^([A-Z_]+)\s+(.*\S)\s+$/) {
+           $props{$1}=$2;
+       }
        if ($state eq 'startchar') {
            if (m/^BBX\s+(\+?\d+)\s+(\+?\d+)\s+([-+]?\d+)\s+([-+]?\d+)\s+$/) {
                ($w,$h,$xo,$yo) = ($1,$2,$3,$4);
@@ -156,13 +162,13 @@ sub loadfoundries () {
 
 sub processpcfgz ($$$$) {
     my ($inpcfgz,$outpcfgz,$logfile,$what) = @_;
-
+    print $reportfh "processing $inpcfgz to $outpcfgz\n" if $verbose>=2;
     my $current = new IO::File $inpcfgz, '<' or die "$inpcfgz $!";
     my ($usread,$uswrite);
     my ($reader,$writer);
     my @children;
     foreach my $proc (['gunzip'], ['pcf2bdf'], [],
-                     ['bdftopcf'],['',qw(gzip -1)]) {
+                     ['bdftopcf'],['',qw(gzip -1 -n)]) {
        my $isfinal = (@$proc && $proc->[0] eq '');
        if (!$isfinal) {
            $reader = new IO::Handle or die $!;