Hi David,
I've cooked a quick patch to make fc-cache work again. I'll comment in
the next mail.
--
Regards,
olv
=== include/freetype/config/ftoption.h
==================================================================
--- include/freetype/config/ftoption.h (revision 3230)
+++ include/freetype/config/ftoption.h (local)
@@ -591,6 +591,7 @@
#define FT_STRICT_ALIASING
*/
+#define FT_CONFIG_OPTION_OLD_INTERNALS
FT_END_HEADER
=== include/freetype/internal/ftobjs.h
==================================================================
--- include/freetype/internal/ftobjs.h (revision 3230)
+++ include/freetype/internal/ftobjs.h (local)
@@ -175,18 +175,6 @@
/* FreeType. */
/* */
/* <Fields> */
- /* max_points :: */
- /* The maximal number of points used to store the vectorial outline */
- /* of any glyph in this face. If this value cannot be known in */
- /* advance, or if the face isn't scalable, this should be set to 0. */
- /* Only relevant for scalable formats. */
- /* */
- /* max_contours :: */
- /* The maximal number of contours used to store the vectorial */
- /* outline of any glyph in this face. If this value cannot be */
- /* known in advance, or if the face isn't scalable, this should be */
- /* set to 0. Only relevant for scalable formats. */
- /* */
/* transform_matrix :: */
/* A 2x2 matrix of 16.16 coefficients used to transform glyph */
/* outlines after they are loaded from the font. Only used by the */
@@ -213,6 +201,11 @@
/* */
typedef struct FT_Face_InternalRec_
{
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_UShort reserved1;
+ FT_Short reserved2;
+#endif
+
FT_Matrix transform_matrix;
FT_Vector transform_delta;
FT_Int transform_flags;
=== include/freetype/internal/psaux.h
==================================================================
--- include/freetype/internal/psaux.h (revision 3230)
+++ include/freetype/internal/psaux.h (local)
@@ -784,7 +784,6 @@
const PS_Parser_FuncsRec* ps_parser_funcs;
const T1_Builder_FuncsRec* t1_builder_funcs;
const T1_Decoder_FuncsRec* t1_decoder_funcs;
- const AFM_Parser_FuncsRec* afm_parser_funcs;
void
(*t1_decrypt)( FT_Byte* buffer,
@@ -793,6 +792,8 @@
T1_CMap_Classes t1_cmap_classes;
+ const AFM_Parser_FuncsRec* afm_parser_funcs;
+
} PSAux_ServiceRec, *PSAux_Service;
/* backwards-compatible type definition */
=== include/freetype/internal/sfnt.h
==================================================================
--- include/freetype/internal/sfnt.h (revision 3230)
+++ include/freetype/internal/sfnt.h (local)
@@ -510,9 +510,9 @@
/* these functions are called by `load_face' but they can also */
/* be called from external modules, if there is a need to do so */
+ TT_Load_Metrics_Func load_hmtx;
TT_Load_Table_Func load_head;
TT_Load_Metrics_Func load_hhea;
- TT_Load_Metrics_Func load_hmtx;
TT_Load_Table_Func load_cmap;
TT_Load_Table_Func load_maxp;
TT_Load_Table_Func load_os2;
@@ -529,24 +529,24 @@
TT_Load_Table_Func load_bhed;
/* see `ttsbit.h' */
- TT_Load_Table_Func load_eblc;
- TT_Free_Table_Func free_eblc;
TT_Set_SBit_Strike_Func set_sbit_strike;
- TT_Load_Strike_Metrics_Func load_strike_metrics;
+ TT_Load_Table_Func load_eblc;
TT_Find_SBit_Image_Func find_sbit_image;
TT_Load_SBit_Metrics_Func load_sbit_metrics;
TT_Load_SBit_Image_Func load_sbit_image;
+ TT_Free_Table_Func free_eblc;
/* see `ttkern.h' */
TT_Face_GetKerningFunc get_kerning;
- TT_Get_Metrics_Func get_metrics;
-
/* see `ttpost.h' */
TT_Get_PS_Name_Func get_psname;
TT_Free_Table_Func free_psnames;
+ TT_Get_Metrics_Func get_metrics;
+ TT_Load_Strike_Metrics_Func load_strike_metrics;
+
} SFNT_Interface;
=== include/freetype/internal/tttypes.h
==================================================================
--- include/freetype/internal/tttypes.h (revision 3230)
+++ include/freetype/internal/tttypes.h (local)
@@ -311,8 +311,6 @@
} TT_GaspRec;
-#ifndef FT_OPTIMIZE_MEMORY
-
/*************************************************************************/
/* */
/* <Struct> */
@@ -389,9 +387,7 @@
} TT_Kern0_PairRec, *TT_Kern0_Pair;
-#endif /* !OPTIMIZE_MEMORY */
-
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -1267,19 +1263,14 @@
TT_Header header; /* TrueType header table */
TT_HoriHeader horizontal; /* TrueType horizontal header */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* horz_metrics;
- FT_ULong horz_metrics_size;
-#endif
TT_MaxProfile max_profile;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_ULong reserved;
+#endif
FT_Bool vertical_info;
TT_VertHeader vertical; /* TT Vertical header, if present */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* vert_metrics;
- FT_ULong vert_metrics_size;
-#endif
FT_UShort num_names; /* number of name records */
TT_NameTableRec name_table; /* name table */
@@ -1314,13 +1305,7 @@
/***********************************************************************/
/* horizontal device metrics */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* hdmx_table;
- FT_ULong hdmx_table_size;
- FT_UInt hdmx_record_count;
- FT_ULong hdmx_record_size;
- FT_Byte* hdmx_record_sizes;
-#else
+#if !defined( FT_OPTIMIZE_MEMORY ) || defined( FT_CONFIG_OPTION_OLD_INTERNALS )
TT_HdmxRec hdmx;
#endif
@@ -1331,11 +1316,7 @@
TT_PCLT pclt;
/* embedded bitmaps support */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* sbit_table;
- FT_ULong sbit_table_size;
- FT_UInt sbit_num_strikes;
-#else
+#if !defined( FT_OPTIMIZE_MEMORY ) || defined( FT_CONFIG_OPTION_OLD_INTERNALS )
FT_ULong num_sbit_strikes;
TT_SBit_Strike sbit_strikes;
#endif
@@ -1354,10 +1335,7 @@
/***********************************************************************/
/* the glyph locations */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_UInt num_locations;
- FT_Byte* glyph_locations;
-#else
+#if !defined( FT_OPTIMIZE_MEMORY ) || defined( FT_CONFIG_OPTION_OLD_INTERNALS )
FT_UShort num_locations;
FT_Long* glyph_locations;
#endif
@@ -1376,13 +1354,7 @@
FT_ULong cvt_size;
FT_Short* cvt;
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* kern_table;
- FT_ULong kern_table_size;
- FT_UInt num_kern_tables;
- FT_UInt32 kern_avail_bits;
- FT_UInt32 kern_order_bits;
-#else
+#if !defined( FT_OPTIMIZE_MEMORY ) || defined( FT_CONFIG_OPTION_OLD_INTERNALS )
/* the format 0 kerning table, if any */
FT_Int num_kern_pairs;
FT_Int kern_table_index;
@@ -1403,10 +1375,6 @@
GX_Blend blend;
#endif
-#ifdef TT_CONFIG_OPTION_BDF
- TT_BDFRec bdf;
-#endif /* TT_CONFIG_OPTION_BDF */
-
/***********************************************************************/
/* */
/* Other tables or fields. This is used by derivative formats like */
@@ -1418,6 +1386,43 @@
const char* postscript_name;
+#ifdef FT_OPTIMIZE_MEMORY
+ /* hmtx */
+ FT_Byte* horz_metrics;
+ FT_ULong horz_metrics_size;
+
+ /* vmtx */
+ FT_Byte* vert_metrics;
+ FT_ULong vert_metrics_size;
+
+ /* hdmx */
+ FT_Byte* hdmx_table;
+ FT_ULong hdmx_table_size;
+ FT_UInt hdmx_record_count;
+ FT_ULong hdmx_record_size;
+ FT_Byte* hdmx_record_sizes;
+
+ /* eblc */
+ FT_Byte* sbit_table;
+ FT_ULong sbit_table_size;
+ FT_UInt sbit_num_strikes;
+
+ /* loca */
+ FT_Byte* loca_table;
+ FT_UInt loca_offset_count;
+
+ /* kern */
+ FT_Byte* kern_table;
+ FT_ULong kern_table_size;
+ FT_UInt num_kern_tables;
+ FT_UInt32 kern_avail_bits;
+ FT_UInt32 kern_order_bits;
+#endif
+
+#ifdef TT_CONFIG_OPTION_BDF
+ TT_BDFRec bdf;
+#endif /* TT_CONFIG_OPTION_BDF */
+
} TT_FaceRec;
=== src/psaux/psauxmod.c
==================================================================
--- src/psaux/psauxmod.c (revision 3230)
+++ src/psaux/psauxmod.c (local)
@@ -107,15 +107,16 @@
&ps_parser_funcs,
&t1_builder_funcs,
&t1_decoder_funcs,
+
+ t1_decrypt,
+
+ (const T1_CMap_ClassesRec*) &t1_cmap_classes,
+
#ifndef T1_CONFIG_OPTION_NO_AFM
&afm_parser_funcs,
#else
0,
#endif
-
- t1_decrypt,
-
- (const T1_CMap_ClassesRec*) &t1_cmap_classes,
};
=== src/sfnt/sfdriver.c
==================================================================
--- src/sfnt/sfdriver.c (revision 3230)
+++ src/sfnt/sfdriver.c (local)
@@ -389,9 +389,9 @@
tt_face_load_any,
tt_face_load_font_dir,
+ tt_face_load_hmtx,
tt_face_load_head,
tt_face_load_hhea,
- tt_face_load_hmtx,
tt_face_load_cmap,
tt_face_load_maxp,
tt_face_load_os2,
@@ -411,19 +411,20 @@
/* see `ttsbit.h' and `sfnt.h' */
+
+ tt_face_set_sbit_strike,
tt_face_load_eblc,
- tt_face_free_eblc,
- tt_face_set_sbit_strike,
- tt_face_load_strike_metrics,
-#ifdef FT_OPTIMIZE_MEMORY
+#if !defined( FT_OPTIMIZE_MEMORY ) || defined( FT_CONFIG_OPTION_OLD_INTERNALS )
+ tt_find_sbit_image,
+ tt_load_sbit_metrics,
+#else
0,
0,
-#else
- tt_find_sbit_image,
- tt_load_sbit_metrics,
#endif
+
tt_face_load_sbit_image,
+ tt_face_free_eblc,
#else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -441,8 +442,6 @@
/* see `ttkern.h' */
tt_face_get_kerning,
- tt_face_get_metrics,
-
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* see `ttpost.h' */
@@ -456,6 +455,9 @@
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+ tt_face_get_metrics,
+ tt_face_load_strike_metrics,
+
};
=== src/sfnt/ttmtx.c
==================================================================
--- src/sfnt/ttmtx.c (revision 3230)
+++ src/sfnt/ttmtx.c (local)
@@ -118,7 +118,7 @@
goto Fail;
num_longs = face->vertical.number_Of_VMetrics;
- if ( num_longs > table_len / 4 )
+ if ( (FT_ULong)num_longs > table_len / 4 )
num_longs = table_len / 4;
face->vertical.number_Of_VMetrics = 0;
@@ -133,7 +133,7 @@
goto Fail;
num_longs = face->horizontal.number_Of_HMetrics;
- if ( num_longs > table_len / 4 )
+ if ( (FT_ULong)num_longs > table_len / 4 )
num_longs = table_len / 4;
face->horizontal.number_Of_HMetrics = 0;
=== src/sfnt/ttsbit.h
==================================================================
--- src/sfnt/ttsbit.h (revision 3230)
+++ src/sfnt/ttsbit.h (local)
@@ -45,7 +45,7 @@
FT_ULong strike_index,
FT_Size_Metrics* metrics );
-#ifndef FT_OPTIMIZE_MEMORY
+#if !defined( FT_OPTIMIZE_MEMORY ) || defined( FT_CONFIG_OPTION_OLD_INTERNALS )
FT_LOCAL( FT_Error )
tt_find_sbit_image( TT_Face face,
FT_UInt glyph_index,
@@ -58,7 +58,7 @@
tt_load_sbit_metrics( FT_Stream stream,
TT_SBit_Range range,
TT_SBit_Metrics metrics );
-#endif /* !FT_OPTIMIZE_MEMORY */
+#endif
FT_LOCAL( FT_Error )
tt_face_load_sbit_image( TT_Face face,
=== src/sfnt/ttsbit0.c
==================================================================
--- src/sfnt/ttsbit0.c (revision 3230)
+++ src/sfnt/ttsbit0.c (local)
@@ -950,4 +950,43 @@
return error;
}
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ FT_LOCAL( FT_Error )
+ tt_find_sbit_image( TT_Face face,
+ FT_UInt glyph_index,
+ FT_ULong strike_index,
+ TT_SBit_Range *arange,
+ TT_SBit_Strike *astrike,
+ FT_ULong *aglyph_offset )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( glyph_index );
+ FT_UNUSED( strike_index );
+
+ *arange = 0;
+ *astrike = 0;
+ *aglyph_offset = 0;
+
+ return SFNT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_LOCAL( FT_Error )
+ tt_load_sbit_metrics( FT_Stream stream,
+ TT_SBit_Range range,
+ TT_SBit_Metrics metrics )
+ {
+ FT_UNUSED( stream );
+ FT_UNUSED( range );
+
+ FT_ZERO( metrics );
+
+ return SFNT_Err_Unimplemented_Feature;
+ }
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
/* EOF */
=== src/truetype/ttpload.c
==================================================================
--- src/truetype/ttpload.c (revision 3230)
+++ src/truetype/ttpload.c (local)
@@ -89,7 +89,7 @@
error = TT_Err_Invalid_Table;
goto Exit;
}
- face->num_locations = (FT_UInt)( table_len >> 2 );
+ face->loca_offset_count = (FT_UInt)( table_len >> 2 );
}
else
{
@@ -99,14 +99,14 @@
error = TT_Err_Invalid_Table;
goto Exit;
}
- face->num_locations = (FT_UInt)( table_len >> 1 );
+ face->loca_offset_count = (FT_UInt)( table_len >> 1 );
}
/*
* Extract the frame. We don't need to decompress it since
* we are able to parse it directly.
*/
- if ( FT_FRAME_EXTRACT( table_len, face->glyph_locations ) )
+ if ( FT_FRAME_EXTRACT( table_len, face->loca_table ) )
goto Exit;
FT_TRACE2(( "loaded\n" ));
@@ -128,12 +128,12 @@
pos1 = pos2 = 0;
- if ( gindex < face->num_locations )
+ if ( gindex < face->loca_offset_count )
{
if ( face->header.Index_To_Loc_Format != 0 )
{
- p = face->glyph_locations + gindex * 4;
- p_limit = face->glyph_locations + face->num_locations * 4;
+ p = face->loca_table + gindex * 4;
+ p_limit = face->loca_table + face->loca_offset_count * 4;
pos1 = FT_NEXT_ULONG( p );
pos2 = pos1;
@@ -143,8 +143,8 @@
}
else
{
- p = face->glyph_locations + gindex * 2;
- p_limit = face->glyph_locations + face->num_locations * 2;
+ p = face->loca_table + gindex * 2;
+ p_limit = face->loca_table + face->loca_offset_count * 2;
pos1 = FT_NEXT_USHORT( p );
pos2 = pos1;
@@ -178,8 +178,8 @@
FT_Stream stream = face->root.stream;
- FT_FRAME_RELEASE( face->glyph_locations );
- face->num_locations = 0;
+ FT_FRAME_RELEASE( face->loca_table );
+ face->loca_offset_count = 0;
}
_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel