[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Re: Untangling relationship with fontconfig
From: |
Mike FABIAN |
Subject: |
[Freetype] Re: Untangling relationship with fontconfig |
Date: |
Tue, 18 Feb 2003 02:45:17 +0100 |
User-agent: |
Gnus/5.090014 (Oort Gnus v0.14) XEmacs/21.4 (Portable Code, x86_64-suse-linux) |
Alan Chandler <address@hidden> さんは書きました:
> Actually I got xft2 from the fontconfig package - but the fontconfig web site
> implies its been gathered up from the Xfree stuff.
>
> HOWEVER - The following code (line numbers from gvd) seems to my reading to
> be
> a bit strange - can someone please confirm whether I am bonkers or not (I am
> not a fluent C programmer). This is from ftgzip.c in the freetype library.
> 179 /* skip the extra field */
> 180 if ( head[3] && FT_GZIP_EXTRA_FIELD )
> 181 {
> 182 FT_UInt len;
> 183
> 184 if ( FT_READ_USHORT_LE( len ) ||
> 185 FT_STREAM_SKIP( len ) )
> 186 goto Exit;
> 187 }
> 188
> 189 /* skip original file name */
> 190 if ( head[3] && FT_GZIP_ORIG_NAME )
> 191 for (;;)
> 192 {
> 193 FT_UInt c;
> 194
> 195 if ( FT_READ_BYTE( c) )
> 196 goto Exit;
> 197
> 198 if ( c == 0 )
> 199 break;
> 200 }
Here is still a bug. I is already fixed in the freetype CVS
with the following patch:
--- freetype-2.1.3/src/gzip/ftgzip.c 2002-11-06 23:32:54.000000000 +0100
+++ freetype-2.1.3.new/src/gzip/ftgzip.c 2003-01-10 18:24:46.000000000
+0100
@@ -177,7 +177,7 @@
(void)FT_STREAM_SKIP( 6 );
/* skip the extra field */
- if ( head[3] && FT_GZIP_EXTRA_FIELD )
+ if ( head[3] & FT_GZIP_EXTRA_FIELD )
{
FT_UInt len;
@@ -187,7 +187,7 @@
}
/* skip original file name */
- if ( head[3] && FT_GZIP_ORIG_NAME )
+ if ( head[3] & FT_GZIP_ORIG_NAME )
for (;;)
{
FT_UInt c;
--
Mike Fabian <address@hidden> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。