[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] [BUG] We cannot handle face_index using OTC/TTC fonts
From: |
Chisato Yamauchi |
Subject: |
Re: [Devel] [BUG] We cannot handle face_index using OTC/TTC fonts |
Date: |
Sun, 18 Apr 2004 20:23:57 +0900 (JST) |
From: Chisato Yamauchi <address@hidden>
Subject: [Devel] [BUG] We cannot handle face_index using OTC/TTC fonts
Date: Sun, 18 Apr 2004 20:09:21 +0900 (JST)
> 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.
Sorry, this patch has a bug.
I attach new one.
------------------------------------------------------------
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 20:22:26.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,12 @@
/* */
offset = FT_STREAM_POS();
- if ( FT_READ_ULONG( format_tag ) )
+ if ( FT_READ_ULONG( font_format_tag ) )
goto Exit;
- if ( format_tag == TTAG_ttcf )
+ format_tag = font_format_tag;
+
+ if ( font_format_tag == TTAG_ttcf )
{
FT_Int n;
@@ -375,7 +377,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: