* src/cff/cffgload.c (cff_free_glyph_data),

src/cff/cffload.c (cff_font_load): Use FT_UNUSED.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Initialize `error'.
* src/sfnt/sfobjs.c (SFNT_Load_Face): Fix compiler warning.
This commit is contained in:
Werner Lemberg 2002-08-15 23:07:18 +00:00
parent 824daa5881
commit f25ce9d0b3
6 changed files with 80 additions and 47 deletions

View File

@ -1,14 +1,32 @@
2002-08-16 Werner Lemberg <wl@gnu.org>
* src/cff/cffgload.c (cff_free_glyph_data),
src/cff/cffload.c (cff_font_load): Use FT_UNUSED.
2002-08-15 Werner Lemberg <wl@gnu.org>
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Initialize `error'.
* src/sfnt/sfobjs.c (SFNT_Load_Face): Fix compiler warning.
2002-08-15 Graham Asher <graham.asher@btinternet.com>
* src/cff/cffgload.c, src/cff/cffload.c, src/cff/cffload.h,
src/cff/cffobjs.c [FT_CONFIG_OPTION_INCREMENTAL]:
implemented the incremental font loading system for
the CFF driver. Tested using the GhostScript-to-FreeType
bridge (under development).
Implemented the incremental font loading system for the CFF driver.
Tested using the GhostScript-to-FreeType bridge (under development).
* src/cid/cidgload.c [FT_CONFIG_OPTION_INCREMENTAL]:
corrected the incremental font loading implementation to
use the new system introduced on 2002-08-01.
* src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data): New
functions.
(cff_operator_seac, cff_compute_max_advance, cff_slot_load): Use
them.
* src/cff/cffload.c (cff_font_load): Add `face' parameter.
Load charset and encoding only if there are glyphs.
[FT_CONFIG_OPTION_INCREMENTAL]: Incremental fonts don't need
character recipes.
* src/cff/cffload.h, src/cff/cffobjs.c: Updated.
* src/cid/cidgload.c (cid_load_glyph)
[FT_CONFIG_OPTION_INCREMENTAL]: Corrected the incremental font
loading implementation to use the new system introduced on
2002-08-01.
2002-08-06 Werner Lemberg <wl@gnu.org>

View File

@ -572,7 +572,7 @@
FT_Bool destroy )
{
FT_GlyphSlotRec dummy;
FT_Error error;
FT_Error error = FT_Err_Ok;
FT_Glyph glyph;
FT_BitmapGlyph bitmap = NULL;

View File

@ -575,15 +575,20 @@
FT_Error error = face->root.internal->incremental_interface->funcs->get_glyph_data(
face->root.internal->incremental_interface->object,
glyph_index, &data );
*pointer = (FT_Byte*)data.pointer;
*length = data.length;
return error;
}
else
#endif
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
CFF_Font cff = (CFF_Font)(face->extra.data);
return cff_index_access_element( &cff->charstrings_index, glyph_index,
pointer, length );
}
@ -596,7 +601,7 @@
FT_ULong length )
{
#ifndef FT_CONFIG_OPTION_INCREMENTAL
length; /* Prevent compiler warning about unreferenced parameter. */
FT_UNUSED( length );
#endif
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@ -605,16 +610,20 @@
if ( face->root.internal->incremental_interface )
{
FT_Data data;
data.pointer = *pointer;
data.length = length;
face->root.internal->incremental_interface->funcs->free_glyph_data(
face->root.internal->incremental_interface->object,&data );
}
else
#endif
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
CFF_Font cff = (CFF_Font)(face->extra.data);
cff_index_forget_element( &cff->charstrings_index, pointer );
}
}
@ -714,7 +723,8 @@
&charstring, &charstring_len );
if ( !error )
{
error = cff_decoder_parse_charstrings( decoder, charstring, charstring_len );
error = cff_decoder_parse_charstrings( decoder, charstring,
charstring_len );
if ( error )
goto Exit;
@ -2310,12 +2320,15 @@
glyph->root.control_len = 0;
}
else
#endif
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
/* We set control_data and control_len if charstrings is loaded. */
/* See how charstring loads at cff_index_access_element() in */
/* cffload.c. */
{
CFF_IndexRec csindex = cff->charstrings_index;
glyph->root.control_data =
csindex.bytes + csindex.offsets[glyph_index] - 1;
glyph->root.control_len =

View File

@ -2048,11 +2048,11 @@
FT_ULong base_offset;
CFF_FontRecDict dict;
#ifndef FT_CONFIG_OPTION_INCREMENTAL
face; /* Prevent compiler warning about unreferenced parameter. */
FT_UNUSED( face );
#endif
FT_ZERO( font );
font->stream = stream;
@ -2169,7 +2169,6 @@
if ( !face->root.internal->incremental_interface )
#endif
{
/* read the charstrings index now */
if ( dict->charstrings_offset == 0 )
{

View File

@ -75,7 +75,8 @@
glyph_length = glyph_data.length - cid->fd_bytes;
FT_ALLOC( charstring, glyph_length );
if ( !error )
ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes, glyph_length );
ft_memcpy( charstring, glyph_data.pointer + cid->fd_bytes,
glyph_length );
}
face->root.internal->incremental_interface->funcs->free_glyph_data(
@ -163,6 +164,7 @@
FT_Bool found = FALSE;
FT_Incremental_MetricsRec metrics;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
glyph_index, FALSE, &metrics, &found );

View File

@ -516,7 +516,6 @@
{
FT_Face root = &face->root;
FT_Int flags = 0;
FT_Int n;
FT_Memory memory;
@ -614,11 +613,13 @@
}
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
if ( face->num_sbit_strikes )
{
FT_Int n;
root->face_flags |= FT_FACE_FLAG_FIXED_SIZES;
#if 0