summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>2009-01-22 03:50:37 +0000
committerSuzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>2009-01-22 03:50:37 +0000
commit5a00909a774dbdd65490e78d82d69abb06031692 (patch)
tree7bbdea3e9632cd424ff2bc988ac6f00708674c4d
parent0dabaa6ce994307b48b3e1911c3c3306472a9e8c (diff)
downloadfreetype2-5a00909a774dbdd65490e78d82d69abb06031692.tar.gz
* Fix a bug in POSIX resource-fork accessor since 2008-10-04
-rw-r--r--ChangeLog11
-rw-r--r--docs/CHANGES4
-rw-r--r--src/base/ftobjs.c6
3 files changed, 20 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 33236b3dc..f73ab55cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #25347.
+
+ * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Rewind
+ the stream to the original position passed to this function,
+ when ft_lookup_PS_in_sfnt_stream() failed.
+ (Mac_Read_sfnt_Resource): Rewind the stream to the head of
+ sfnt resource body, when open_face_PS_from_sfnt_stream()
+ failed.
+
2009-01-19 Michael Lotz <mmlr@mlotz.ch>
Fix Savannah bug #25355.
diff --git a/docs/CHANGES b/docs/CHANGES
index 818053a34..1c3a72b93 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -2,6 +2,10 @@ CHANGES BETWEEN 2.3.9 and 2.3.8
I. IMPORTANT BUG FIXES
+ - The POSIX support of MacOS resource-fork fonts (Suitcase fonts
+ and LaserWriter Type1 PostScript fonts) was broken in 2.3.8. If
+ FreeType2 is built without Carbon framework, these fonts are not
+ handled correctly. The version 2.3.7 didn't have this bug.
II. IMPORTANT CHANGES
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index fc57c954d..e35ab938a 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1417,7 +1417,7 @@
&length,
&is_sfnt_cid );
if ( error )
- return error;
+ goto Exit;
if ( FT_Stream_Seek( stream, pos + offset ) )
goto Exit;
@@ -1605,6 +1605,10 @@
if ( !error )
goto Exit;
+ /* rewind sfnt stream before open_face_PS_from_sfnt_stream() */
+ if ( FT_Stream_Seek( stream, flag_offset + 4 ) )
+ goto Exit;
+
if ( FT_ALLOC( sfnt_data, (FT_Long)rlen ) )
return error;
error = FT_Stream_Read( stream, (FT_Byte *)sfnt_data, rlen );