[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On patches
From: |
Ludovic Courtès |
Subject: |
On patches |
Date: |
Wed, 29 Jun 2005 11:09:32 +0200 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Hi,
Michael Piotrowski <address@hidden> writes:
> While trying it, I noticed that the Latin Modern patch didn't get
> applied (I hadn't noticed it before because I'm using a script to
> patch and build Lout, and it didn't cause problems). Apparently, the
> indentation of z37.c and your patch don't match; z37.c mixes tabs and
> spaces, while in the patch are spaces only. I consider mixed tabs and
> spaces problematic, but that's the way it is; for our convenience,
> would you mind producing a new patch?
I'm attaching a hopefully better patch for the Latin Modern ligature
problem. Note that in case of whitespace/tabs issues, `patch -l' should
work better.
I actually use GNU Arch [1] to keep track of revisions I make [2].
Compared to older software configuration management systems (SCMs) like
CVS or Subversion, Arch is much more flexible and greatly eases
distributed development. In particular, anyone can create a branch
starting from an existing project branch without requiring write access
to that branch. Additionally, no special server is needed to make a
source repository (an "archive" in Arch terms) publicly available:
repositories are just a file hierarchy that can be made available over
http, ftp, sftp, or whatever file protocol.
I'm not sure Jeff would be willing to switch to a new revision control
system, but I think it could really be beneficial to Lout. End of my
GNU Arch advocacy. ;-)
Thanks,
Ludovic.
[1] http://www.gnu.org/software/gnu-arch/
[2] My GNU Arch archive is located at
http://www.laas.fr/~lcourtes/software/address@hidden/ .
--- orig/z37.c
+++ mod/z37.c
@@ -317,10 +317,12 @@
}
else if( StringEqual(command, "L") &&
BackEnd->uses_font_metrics && ch != '\0' )
- { if( lig[ch] == 1 ) lig[ch] = (*ligtop) - MAX_CHARS;
+ { int prev_ligtop = *ligtop, prev_lig = lig[ch];
+ if( lig[ch] == 1 ) lig[ch] = (*ligtop) - MAX_CHARS;
lig[(*ligtop)++] = ch;
i++; /* skip L */
while( buff[i] == ' ' ) i++;
+
while( buff[i] != ';' && buff[i] != '\0' )
{ sscanf( (char *) &buff[i], "%s", command);
ligchar = MapCharEncoding(command, font_mapping(face));
@@ -328,7 +330,10 @@
else
{ Error(37, 1, "ignoring unencoded ligature character %s in font file
%s (line %d)",
WARN, &fpos(AFMfilename), command, FileName(fnum), *lnum);
- lig[ch] = 1;
+ /* Restore ligature pointers as they were before we read this
+ invalid ligature */
+ lig[ch] = prev_lig;
+ *ligtop = prev_ligtop;
}
if( *ligtop > 2*MAX_CHARS - 5 )
Error(37, 2, "too many ligature characters in font file %s (line
%d)",
@@ -336,7 +341,9 @@
while( buff[i] != ' ' && buff[i] != ';' ) i++;
while( buff[i] == ' ' ) i++;
}
- lig[(*ligtop)++] = '\0';
+ if (*ligtop != prev_ligtop)
+ /* Add a trailing zero if a ligature was actually read */
+ lig[(*ligtop)++] = '\0';
}
while( buff[i] != ';' && buff[i] != '\0' ) i++;
if( buff[i] == ';' )
Re: Margin kerning, Jeff Kingston, 2005/06/28