[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix: freetype2/src/cid/cidparse.c
From: |
Yamano-uchi, Hidetoshi |
Subject: |
Fix: freetype2/src/cid/cidparse.c |
Date: |
Mon, 09 Oct 2000 23:08:14 +0900 |
Hello,
I found a bug which some T1 CID font file cannot load.
The following fix enables loading "all" CID font. But I found another
bug and not fixed yet.....
% ./ftdump HKGOW5A.CID
There is 1 face in this file.
----- Face number: 0 -----
font name entries
family: /HeiseiKakuGo-W5-Acrobat
^^^^^^^^^^^^^^^^^^^^^^^^ It is wrong.
style: Regular
font type entries
FreeType driver: t1cid
sfnt wrapped: no
type: scalable
direction: horizontal
fixed width: no
fast glyphs: no
glyph names: no
--- cidparse.c.dist Sun Sep 3 11:47:22 2000
+++ cidparse.c Sun Oct 8 13:10:18 2000
@@ -97,16 +97,19 @@
for (;;)
{
FT_Byte *p, *limit = buffer + 256;
-
+ FT_ULong top_position;
/* fill input buffer */
buff_len -= 256;
if ( buff_len > 0 )
MEM_Move( buffer, limit, buff_len );
- if ( FILE_Read( buffer, 256 + 10 - buff_len ) )
+ p = buffer + buff_len;
+
+ if ( FILE_Read( p, 256 + 10 - buff_len ) )
goto Exit;
+ top_position = FILE_Pos() - buff_len;
buff_len = 256 + 10;
/* look for `StartData' */
@@ -115,7 +118,7 @@
if ( p[0] == 'S' && strncmp( (char*)p, "StartData", 9 ) == 0 )
{
/* save offset of binary data after `StartData' */
- offset = FILE_Pos() - ( limit - p ) + 10;
+ offset = top_position - ( limit - p ) + 10;
goto Found;
}
}
- Fix: freetype2/src/cid/cidparse.c,
Yamano-uchi, Hidetoshi <=