[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] [BUG] We cannot handle face_index using OTC/TTC fonts
From: |
Chisato Yamauchi |
Subject: |
[Devel] [BUG] We cannot handle face_index using OTC/TTC fonts |
Date: |
Sun, 18 Apr 2004 20:09:21 +0900 (JST) |
Hello,
I found a serious bug. The freetype-2.1.8rc1 cannot
use 0<face_index of OTC/TTC fonts. When face_index==0,
the font is displayed. But tt_face_load_sfnt_header()
returns an error when face_index!=0.
I attach a patch for the bug.
------------------------------------------------------------
Chisato Yamauchi
--- xc/extras/freetype-2.1.8rc1._orig_/src/sfnt/ttload.c 2004-04-02
05:35:35.000000000 +0900
+++ xc/extras/freetype2/src/sfnt/ttload.c 2004-04-18 19:52:49.000000000
+0900
@@ -276,7 +276,7 @@
SFNT_Header sfnt )
{
FT_Error error;
- FT_ULong format_tag, offset;
+ FT_ULong font_format_tag, format_tag, offset;
FT_Memory memory = stream->memory;
static const FT_Frame_Field sfnt_header_fields[] =
@@ -318,10 +318,10 @@
/* */
offset = FT_STREAM_POS();
- if ( FT_READ_ULONG( format_tag ) )
+ if ( FT_READ_ULONG( font_format_tag ) )
goto Exit;
- if ( format_tag == TTAG_ttcf )
+ if ( font_format_tag == TTAG_ttcf )
{
FT_Int n;
@@ -375,7 +375,7 @@
}
/* disallow face index values > 0 for non-TTC files */
- if ( format_tag != TTAG_ttcf && face_index > 0 )
+ if ( font_format_tag != TTAG_ttcf && face_index > 0 )
error = SFNT_Err_Bad_Argument;
Exit:
- [Devel] [BUG] We cannot handle face_index using OTC/TTC fonts,
Chisato Yamauchi <=