forked from minhngoc25a/freetype2
[gf] Temporary changes for compiling gf driver.
This commit is contained in:
parent
3ff144c5d9
commit
5147064e1b
|
@ -0,0 +1,483 @@
|
|||
ChangeLog.21: * src/base/ftstream.c (FT_Stream_Close): Don't reset stream->close
|
||||
builds/mac/ftmac.c: resource fork. So we just grab the stream->pathname field.
|
||||
builds/mac/ftmac.c:#define STREAM_FILE( stream ) ( (FT_FILE*)stream->descriptor.pointer )
|
||||
builds/mac/ftmac.c: stream->descriptor.pointer = NULL;
|
||||
builds/mac/ftmac.c: stream->size = 0;
|
||||
builds/mac/ftmac.c: stream->base = 0;
|
||||
builds/unix/ftsystem.c:#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
|
||||
builds/unix/ftsystem.c: munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
|
||||
builds/unix/ftsystem.c: stream->descriptor.pointer = NULL;
|
||||
builds/unix/ftsystem.c: stream->size = 0;
|
||||
builds/unix/ftsystem.c: stream->base = 0;
|
||||
builds/unix/ftsystem.c: ft_free( NULL, stream->descriptor.pointer );
|
||||
builds/unix/ftsystem.c: stream->descriptor.pointer = NULL;
|
||||
builds/unix/ftsystem.c: stream->size = 0;
|
||||
builds/unix/ftsystem.c: stream->base = 0;
|
||||
builds/unix/ftsystem.c: /* `stream->size' is typedef'd to unsigned long (in `ftsystem.h'); */
|
||||
builds/unix/ftsystem.c: stream->size = (unsigned long)stat_buf.st_size;
|
||||
builds/unix/ftsystem.c: stream->pos = 0;
|
||||
builds/unix/ftsystem.c: stream->base = (unsigned char *)mmap( NULL,
|
||||
builds/unix/ftsystem.c: stream->size,
|
||||
builds/unix/ftsystem.c: if ( (long)stream->base != -1 && stream->base != NULL )
|
||||
builds/unix/ftsystem.c: stream->close = ft_close_stream_by_munmap;
|
||||
builds/unix/ftsystem.c: stream->base = (unsigned char*)ft_alloc( NULL, stream->size );
|
||||
builds/unix/ftsystem.c: if ( !stream->base )
|
||||
builds/unix/ftsystem.c: stream->base + total_read_count,
|
||||
builds/unix/ftsystem.c: stream->size - total_read_count );
|
||||
builds/unix/ftsystem.c: } while ( (unsigned long)total_read_count != stream->size );
|
||||
builds/unix/ftsystem.c: stream->close = ft_close_stream_by_free;
|
||||
builds/unix/ftsystem.c: stream->descriptor.pointer = stream->base;
|
||||
builds/unix/ftsystem.c: stream->pathname.pointer = (char*)filepathname;
|
||||
builds/unix/ftsystem.c: stream->read = 0;
|
||||
builds/unix/ftsystem.c: filepathname, stream->size ));
|
||||
builds/unix/ftsystem.c: ft_free( NULL, stream->base );
|
||||
builds/unix/ftsystem.c: stream->base = NULL;
|
||||
builds/unix/ftsystem.c: stream->size = 0;
|
||||
builds/unix/ftsystem.c: stream->pos = 0;
|
||||
builds/vms/ftsystem.c:#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
|
||||
builds/vms/ftsystem.c: munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
|
||||
builds/vms/ftsystem.c: stream->descriptor.pointer = NULL;
|
||||
builds/vms/ftsystem.c: stream->size = 0;
|
||||
builds/vms/ftsystem.c: stream->base = 0;
|
||||
builds/vms/ftsystem.c: stream->size = stat_buf.st_size;
|
||||
builds/vms/ftsystem.c: if ( !stream->size )
|
||||
builds/vms/ftsystem.c: stream->pos = 0;
|
||||
builds/vms/ftsystem.c: stream->base = (unsigned char *)mmap( NULL,
|
||||
builds/vms/ftsystem.c: stream->size,
|
||||
builds/vms/ftsystem.c: if ( (long)stream->base == -1 )
|
||||
builds/vms/ftsystem.c: stream->descriptor.pointer = stream->base;
|
||||
builds/vms/ftsystem.c: stream->pathname.pointer = (char*)filepathname;
|
||||
builds/vms/ftsystem.c: stream->close = ft_close_stream;
|
||||
builds/vms/ftsystem.c: stream->read = 0;
|
||||
builds/vms/ftsystem.c: filepathname, stream->size ));
|
||||
builds/vms/ftsystem.c: stream->base = NULL;
|
||||
builds/vms/ftsystem.c: stream->size = 0;
|
||||
builds/vms/ftsystem.c: stream->pos = 0;
|
||||
builds/amiga/src/base/ftsystem.c:#define STREAM_FILE( stream ) ( (struct SysFile *)stream->descriptor.pointer )
|
||||
builds/amiga/src/base/ftsystem.c: stream->descriptor.pointer = NULL;
|
||||
builds/amiga/src/base/ftsystem.c: stream->size = 0;
|
||||
builds/amiga/src/base/ftsystem.c: stream->base = 0;
|
||||
builds/amiga/src/base/ftsystem.c: stream->size = fib->fib_Size;
|
||||
builds/amiga/src/base/ftsystem.c: stream->descriptor.pointer = (void *)sysfile;
|
||||
builds/amiga/src/base/ftsystem.c: stream->pathname.pointer = (char*)filepathname;
|
||||
builds/amiga/src/base/ftsystem.c: stream->pos = 0;
|
||||
builds/amiga/src/base/ftsystem.c: stream->read = ft_amiga_stream_io;
|
||||
builds/amiga/src/base/ftsystem.c: stream->close = ft_amiga_stream_close;
|
||||
builds/amiga/src/base/ftsystem.c: if ( !stream->size )
|
||||
builds/amiga/src/base/ftsystem.c: filepathname, stream->size ));
|
||||
include/freetype/internal/ftstream.h:#define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor )
|
||||
include/freetype/internal/cfftypes.h: FT_Memory memory; /* TODO: take this from stream->memory? */
|
||||
src/type1/t1parse.c: if ( ft_memcmp( stream->cursor, header_string, header_length ) != 0 )
|
||||
src/type1/t1parse.c: size = stream->size;
|
||||
src/type1/t1parse.c: if ( !stream->read )
|
||||
src/type1/t1parse.c: parser->base_dict = (FT_Byte*)stream->base + stream->pos;
|
||||
src/type1/t1afm.c: FT_Memory memory = stream->memory;
|
||||
src/type1/t1afm.c: start = (FT_Byte*)stream->cursor;
|
||||
src/type1/t1afm.c: limit = (FT_Byte*)stream->limit;
|
||||
src/type1/t1afm.c: FT_Memory memory = stream->memory;
|
||||
src/type1/t1afm.c: FT_FRAME_ENTER( stream->size ) )
|
||||
src/type1/t1afm.c: stream->memory,
|
||||
src/type1/t1afm.c: stream->cursor,
|
||||
src/type1/t1afm.c: stream->limit );
|
||||
src/type1/t1afm.c: FT_Byte* start = stream->cursor;
|
||||
src/type1/t1afm.c: if ( stream->size > 6 &&
|
||||
src/type1/t1afm.c: FT_PEEK_ULONG_LE( start + 2 ) == stream->size )
|
||||
src/cid/cidload.c: if ( (FT_ULong)num_dicts > stream->size / 100 )
|
||||
src/cid/cidload.c: stream->size / 100 ));
|
||||
src/cid/cidload.c: num_dicts = (FT_Long)( stream->size / 100 );
|
||||
src/cid/cidload.c: p = (FT_Byte*)stream->cursor;
|
||||
src/cid/cidload.c: if ( offsets[num_subrs] > stream->size - cid->data_offset )
|
||||
src/cid/cidload.c: FT_ULong size = stream->size - oldpos;
|
||||
src/cid/cidload.c: face->root.stream->size - parser->data_offset )
|
||||
src/cid/cidload.c: face->root.stream->size - parser->data_offset ));
|
||||
src/cid/cidload.c: parser->binary_length = face->root.stream->size -
|
||||
src/cid/cidload.c: binary_length = face->cid_stream->size - cid->data_offset;
|
||||
src/cid/cidparse.c: if ( ft_strncmp( (char *)stream->cursor,
|
||||
src/cid/cidparse.c: stream_len = stream->size - FT_STREAM_POS();
|
||||
src/cid/cidgload.c: p = (FT_Byte*)stream->cursor;
|
||||
src/cid/cidgload.c: off2 > stream->size ||
|
||||
src/sfnt/ttload.c: if ( table.Offset > stream->size )
|
||||
src/sfnt/ttload.c: else if ( table.Length > stream->size - table.Offset )
|
||||
src/sfnt/ttload.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/ttload.c: if ( entry.Offset > stream->size )
|
||||
src/sfnt/ttload.c: else if ( entry.Length > stream->size - entry.Offset )
|
||||
src/sfnt/ttload.c: entry.Length = ( stream->size - entry.Offset ) & ~3U;
|
||||
src/sfnt/ttload.c: size = face->root.stream->size;
|
||||
src/sfnt/ttload.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/ttload.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/sfobjs.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/sfobjs.c: FT_FREE( stream->base );
|
||||
src/sfnt/sfobjs.c: stream->size = 0;
|
||||
src/sfnt/sfobjs.c: stream->base = NULL;
|
||||
src/sfnt/sfobjs.c: stream->close = NULL;
|
||||
src/sfnt/sfobjs.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/sfobjs.c: if ( woff.length != stream->size ||
|
||||
src/sfnt/sfobjs.c: stream->cursor,
|
||||
src/sfnt/sfobjs.c: stream->cursor, table->CompLength );
|
||||
src/sfnt/sfobjs.c: sfnt_stream->memory = stream->memory;
|
||||
src/sfnt/sfobjs.c: sfnt_stream->close = sfnt_stream_close;
|
||||
src/sfnt/sfobjs.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/sfobjs.c: if ( (FT_ULong)face->ttc_header.count > stream->size / ( 28 + 4 ) )
|
||||
src/sfnt/sfobjs.c: FT_Memory memory = face->root.stream->memory;
|
||||
src/sfnt/ttsbit.c: decoder->stream->memory,
|
||||
src/sfnt/ttsbit.c: stream->memory,
|
||||
src/sfnt/ttsbit.c: stream->cursor,
|
||||
src/sfnt/ttpost.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/ttpost.c: FT_Memory memory = stream->memory;
|
||||
src/sfnt/pngshim.c: ft_memcpy( data, stream->cursor, length );
|
||||
src/sfnt/sfdriver.c: p = (FT_Char*)stream->cursor;
|
||||
src/sfnt/sfdriver.c: p = (FT_Char*)stream->cursor;
|
||||
src/tools/test_afm.c: error = FT_Stream_EnterFrame( stream, stream->size );
|
||||
src/tools/test_afm.c: stream->cursor,
|
||||
src/tools/test_afm.c: stream->limit );
|
||||
src/pfr/pfrload.c: 2 + count * 5 >= stream->size - section_offset ||
|
||||
src/pfr/pfrload.c: 95 + count * ( 5 + 18 ) >= stream->size )
|
||||
src/pfr/pfrload.c: p = stream->cursor;
|
||||
src/pfr/pfrload.c: FT_Memory memory = stream->memory;
|
||||
src/pfr/pfrload.c: phy_font->cursor = stream->cursor;
|
||||
src/pfr/pfrload.c: p = stream->cursor;
|
||||
src/pfr/pfrload.c: phy_font->chars_offset = offset + (FT_Offset)( p - stream->cursor );
|
||||
src/pfr/pfrgload.c: p = (FT_Byte*)stream->cursor;
|
||||
src/pfr/pfrobjs.c: FT_Memory memory = pfrface->stream->memory;
|
||||
src/pfr/pfrobjs.c: FT_Byte* base = stream->cursor;
|
||||
src/pfr/pfrsbit.c: pfr_lookup_bitmap_data( stream->cursor,
|
||||
src/pfr/pfrsbit.c: stream->limit,
|
||||
src/pfr/pfrsbit.c: p = stream->cursor;
|
||||
src/pfr/pfrsbit.c: error = pfr_load_bitmap_metrics( &p, stream->limit,
|
||||
src/pfr/pfrsbit.c: stream->limit,
|
||||
src/gzip/ftgzip.c: zip->memory = stream->memory;
|
||||
src/gzip/ftgzip.c: zstream->zalloc = (alloc_func)ft_gzip_alloc;
|
||||
src/gzip/ftgzip.c: zstream->zfree = (free_func) ft_gzip_free;
|
||||
src/gzip/ftgzip.c: zstream->opaque = stream->memory;
|
||||
src/gzip/ftgzip.c: zstream->avail_in = 0;
|
||||
src/gzip/ftgzip.c: zstream->next_in = zip->buffer;
|
||||
src/gzip/ftgzip.c: !zstream->next_in )
|
||||
src/gzip/ftgzip.c: zstream->zalloc = NULL;
|
||||
src/gzip/ftgzip.c: zstream->zfree = NULL;
|
||||
src/gzip/ftgzip.c: zstream->opaque = NULL;
|
||||
src/gzip/ftgzip.c: zstream->next_in = NULL;
|
||||
src/gzip/ftgzip.c: zstream->next_out = NULL;
|
||||
src/gzip/ftgzip.c: zstream->avail_in = 0;
|
||||
src/gzip/ftgzip.c: zstream->avail_out = 0;
|
||||
src/gzip/ftgzip.c: zstream->avail_in = 0;
|
||||
src/gzip/ftgzip.c: zstream->next_in = zip->input;
|
||||
src/gzip/ftgzip.c: zstream->avail_out = 0;
|
||||
src/gzip/ftgzip.c: zstream->next_out = zip->buffer;
|
||||
src/gzip/ftgzip.c: if ( stream->read )
|
||||
src/gzip/ftgzip.c: size = stream->read( stream, stream->pos, zip->input,
|
||||
src/gzip/ftgzip.c: size = stream->size - stream->pos;
|
||||
src/gzip/ftgzip.c: FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
|
||||
src/gzip/ftgzip.c: stream->pos += size;
|
||||
src/gzip/ftgzip.c: zstream->next_in = zip->input;
|
||||
src/gzip/ftgzip.c: zstream->avail_in = size;
|
||||
src/gzip/ftgzip.c: zstream->next_out = zip->cursor;
|
||||
src/gzip/ftgzip.c: zstream->avail_out = FT_GZIP_BUFFER_SIZE;
|
||||
src/gzip/ftgzip.c: while ( zstream->avail_out > 0 )
|
||||
src/gzip/ftgzip.c: if ( zstream->avail_in == 0 )
|
||||
src/gzip/ftgzip.c: zip->limit = zstream->next_out;
|
||||
src/gzip/ftgzip.c: FT_GZipFile zip = (FT_GZipFile)stream->descriptor.pointer;
|
||||
src/gzip/ftgzip.c: FT_Memory memory = stream->memory;
|
||||
src/gzip/ftgzip.c: stream->descriptor.pointer = NULL;
|
||||
src/gzip/ftgzip.c: if ( !stream->read )
|
||||
src/gzip/ftgzip.c: FT_FREE( stream->base );
|
||||
src/gzip/ftgzip.c: FT_GZipFile zip = (FT_GZipFile)stream->descriptor.pointer;
|
||||
src/gzip/ftgzip.c: old_pos = stream->pos;
|
||||
src/gzip/ftgzip.c: if ( !FT_Stream_Seek( stream, stream->size - 4 ) )
|
||||
src/gzip/ftgzip.c: stream->memory = memory;
|
||||
src/gzip/ftgzip.c: stream->descriptor.pointer = zip;
|
||||
src/gzip/ftgzip.c: stream->descriptor.pointer = NULL;
|
||||
src/gzip/ftgzip.c: stream->size = zip_size;
|
||||
src/gzip/ftgzip.c: stream->pos = 0;
|
||||
src/gzip/ftgzip.c: stream->base = zip_buff;
|
||||
src/gzip/ftgzip.c: stream->read = NULL;
|
||||
src/gzip/ftgzip.c: stream->close = ft_gzip_stream_close;
|
||||
src/gzip/ftgzip.c: stream->size = zip_size;
|
||||
src/gzip/ftgzip.c: stream->size = 0x7FFFFFFFL; /* don't know the real size! */
|
||||
src/gzip/ftgzip.c: stream->pos = 0;
|
||||
src/gzip/ftgzip.c: stream->base = NULL;
|
||||
src/gzip/ftgzip.c: stream->read = ft_gzip_stream_io;
|
||||
src/gzip/ftgzip.c: stream->close = ft_gzip_stream_close;
|
||||
src/gzip/zlib.h: basic stream-oriented functions. To simplify the interface, some
|
||||
src/bdf/bdflib.c: FT_Memory memory = stream->memory;
|
||||
src/bdf/bdflib.c: p->size = stream->size;
|
||||
src/gf/gflib.c: FT_FILE *fp = stream->descriptor.pointer ; /* (FT_FILE*)stream->descriptor.pointer XXX Unforseen errors with STREAM_FILE( stream ) */
|
||||
src/gf/gflib.c: printf("\nHi I am here in gf_load_font 1 stream->pathname: %s %p\n\n", stream->pathname, *fp);
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOL;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOC;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOF;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOL;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOC;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOF;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOL;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOF;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_NORMAL;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_NORMAL;
|
||||
src/psaux/afmparse.c: stream->cursor = stream->base = base;
|
||||
src/psaux/afmparse.c: stream->limit = limit;
|
||||
src/psaux/afmparse.c: stream->status = AFM_STREAM_STATUS_EOL;
|
||||
src/bzip2/ftbzip2.c: zip->memory = stream->memory;
|
||||
src/bzip2/ftbzip2.c: bzstream->bzalloc = (alloc_func)ft_bzip2_alloc;
|
||||
src/bzip2/ftbzip2.c: bzstream->bzfree = (free_func) ft_bzip2_free;
|
||||
src/bzip2/ftbzip2.c: bzstream->opaque = zip->memory;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_in = 0;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_in = (char*)zip->buffer;
|
||||
src/bzip2/ftbzip2.c: !bzstream->next_in )
|
||||
src/bzip2/ftbzip2.c: bzstream->bzalloc = NULL;
|
||||
src/bzip2/ftbzip2.c: bzstream->bzfree = NULL;
|
||||
src/bzip2/ftbzip2.c: bzstream->opaque = NULL;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_in = NULL;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_out = NULL;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_in = 0;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_out = 0;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_in = 0;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_in = (char*)zip->input;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_out = 0;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_out = (char*)zip->buffer;
|
||||
src/bzip2/ftbzip2.c: if ( stream->read )
|
||||
src/bzip2/ftbzip2.c: size = stream->read( stream, stream->pos, zip->input,
|
||||
src/bzip2/ftbzip2.c: size = stream->size - stream->pos;
|
||||
src/bzip2/ftbzip2.c: FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
|
||||
src/bzip2/ftbzip2.c: stream->pos += size;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_in = (char*)zip->input;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_in = size;
|
||||
src/bzip2/ftbzip2.c: bzstream->next_out = (char*)zip->cursor;
|
||||
src/bzip2/ftbzip2.c: bzstream->avail_out = FT_BZIP2_BUFFER_SIZE;
|
||||
src/bzip2/ftbzip2.c: while ( bzstream->avail_out > 0 )
|
||||
src/bzip2/ftbzip2.c: if ( bzstream->avail_in == 0 )
|
||||
src/bzip2/ftbzip2.c: zip->limit = (FT_Byte*)bzstream->next_out;
|
||||
src/bzip2/ftbzip2.c: FT_BZip2File zip = (FT_BZip2File)stream->descriptor.pointer;
|
||||
src/bzip2/ftbzip2.c: FT_Memory memory = stream->memory;
|
||||
src/bzip2/ftbzip2.c: stream->descriptor.pointer = NULL;
|
||||
src/bzip2/ftbzip2.c: FT_BZip2File zip = (FT_BZip2File)stream->descriptor.pointer;
|
||||
src/bzip2/ftbzip2.c: stream->memory = memory;
|
||||
src/bzip2/ftbzip2.c: stream->descriptor.pointer = zip;
|
||||
src/bzip2/ftbzip2.c: stream->size = 0x7FFFFFFFL; /* don't know the real size! */
|
||||
src/bzip2/ftbzip2.c: stream->pos = 0;
|
||||
src/bzip2/ftbzip2.c: stream->base = 0;
|
||||
src/bzip2/ftbzip2.c: stream->read = ft_bzip2_stream_io;
|
||||
src/bzip2/ftbzip2.c: stream->close = ft_bzip2_stream_close;
|
||||
src/winfonts/winfnt.c: (FT_ULong)( stream->cursor - stream->limit );
|
||||
src/winfonts/winfnt.c: stream->cursor += 4 + count * 12;
|
||||
src/winfonts/winfnt.c: if ( font_count * 118UL > stream->size )
|
||||
src/winfonts/winfnt.c: stream->cursor += 8;
|
||||
src/winfonts/winfnt.c: font->fnt_size = stream->size;
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/cff/cffload.c: p = (FT_Byte*)stream->cursor;
|
||||
src/cff/cffload.c: FT_Memory memory = idx->stream->memory;
|
||||
src/cff/cffload.c: if ( off2 > stream->size + 1 ||
|
||||
src/cff/cffload.c: idx->data_offset > stream->size - off2 + 1 )
|
||||
src/cff/cffload.c: off2, stream->size - idx->data_offset + 1 ));
|
||||
src/cff/cffload.c: off2 = stream->size - idx->data_offset + 1;
|
||||
src/cff/cffload.c: memory = idx->stream->memory;
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/cff/cffload.c: p = (FT_Byte*)stream->cursor;
|
||||
src/cff/cffload.c: stream->memory );
|
||||
src/cff/cffload.c: (FT_Byte*)stream->cursor,
|
||||
src/cff/cffload.c: (FT_Byte*)stream->limit );
|
||||
src/cff/cffload.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgxvar.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttpload.c: dist = (FT_Long)stream->size - pos;
|
||||
src/truetype/ttpload.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttpload.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttpload.c: FT_Memory memory = stream->memory;
|
||||
src/truetype/ttgload.c: loader->cursor = stream->cursor;
|
||||
src/truetype/ttgload.c: loader->limit = stream->limit;
|
||||
src/pcf/pcfread.c: if ( stream->size < 16 )
|
||||
src/pcf/pcfread.c: if ( toc->count > ( stream->size >> 4 ) ||
|
||||
src/pcf/pcfread.c: FT_MIN( stream->size >> 4, 9 ) ));
|
||||
src/pcf/pcfread.c: toc->count = FT_MIN( stream->size >> 4, 9 );
|
||||
src/pcf/pcfread.c: size = stream->size;
|
||||
src/pcf/pcfread.c: if ( stream->pos > tables[i].offset )
|
||||
src/pcf/pcfread.c: if ( FT_STREAM_SKIP( tables[i].offset - stream->pos ) )
|
||||
src/pcf/pcfread.c: face->metrics[i].bits = stream->pos + (FT_ULong)offsets[i];
|
||||
src/lzw/ftlzw.c: zip->memory = stream->memory;
|
||||
src/lzw/ftlzw.c: FT_LZWFile zip = (FT_LZWFile)stream->descriptor.pointer;
|
||||
src/lzw/ftlzw.c: FT_Memory memory = stream->memory;
|
||||
src/lzw/ftlzw.c: stream->descriptor.pointer = NULL;
|
||||
src/lzw/ftlzw.c: FT_LZWFile zip = (FT_LZWFile)stream->descriptor.pointer;
|
||||
src/lzw/ftlzw.c: stream->memory = memory;
|
||||
src/lzw/ftlzw.c: stream->descriptor.pointer = zip;
|
||||
src/lzw/ftlzw.c: stream->size = 0x7FFFFFFFL; /* don't know the real size! */
|
||||
src/lzw/ftlzw.c: stream->pos = 0;
|
||||
src/lzw/ftlzw.c: stream->base = 0;
|
||||
src/lzw/ftlzw.c: stream->read = ft_lzw_stream_io;
|
||||
src/lzw/ftlzw.c: stream->close = ft_lzw_stream_close;
|
||||
src/type42/t42parse.c: if ( ft_memcmp( stream->cursor, "%!PS-TrueTypeFont", 17 ) != 0 )
|
||||
src/type42/t42parse.c: size = (FT_Long)stream->size;
|
||||
src/type42/t42parse.c: if ( !stream->read )
|
||||
src/type42/t42parse.c: parser->base_dict = (FT_Byte*)stream->base + stream->pos;
|
||||
src/base/ftmac.c: resource fork. So we just grab the stream->pathname field.
|
||||
src/base/ftrfork.c: (FT_ULong)( rfork_offset + *rdata_pos + rdata_len ) > stream->size ||
|
||||
src/base/ftrfork.c: (FT_ULong)( rfork_offset + map_pos + map_len ) > stream->size )
|
||||
src/base/ftstream.c: stream->base = (FT_Byte*) base;
|
||||
src/base/ftstream.c: stream->size = size;
|
||||
src/base/ftstream.c: stream->pos = 0;
|
||||
src/base/ftstream.c: stream->cursor = NULL;
|
||||
src/base/ftstream.c: stream->read = NULL;
|
||||
src/base/ftstream.c: stream->close = NULL;
|
||||
src/base/ftstream.c: if ( stream && stream->close )
|
||||
src/base/ftstream.c: stream->close( stream );
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if ( stream->read( stream, pos, 0, 0 ) )
|
||||
src/base/ftstream.c: pos, stream->size ));
|
||||
src/base/ftstream.c: else if ( pos > stream->size )
|
||||
src/base/ftstream.c: pos, stream->size ));
|
||||
src/base/ftstream.c: stream->pos = pos;
|
||||
src/base/ftstream.c: return FT_Stream_Seek( stream, stream->pos + (FT_ULong)distance );
|
||||
src/base/ftstream.c: return stream->pos;
|
||||
src/base/ftstream.c: return FT_Stream_ReadAt( stream, stream->pos, buffer, count );
|
||||
src/base/ftstream.c: if ( pos >= stream->size )
|
||||
src/base/ftstream.c: pos, stream->size ));
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: read_bytes = stream->read( stream, pos, buffer, count );
|
||||
src/base/ftstream.c: read_bytes = stream->size - pos;
|
||||
src/base/ftstream.c: FT_MEM_COPY( buffer, stream->base + pos, read_bytes );
|
||||
src/base/ftstream.c: stream->pos = pos + read_bytes;
|
||||
src/base/ftstream.c: if ( stream->pos >= stream->size )
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: read_bytes = stream->read( stream, stream->pos, buffer, count );
|
||||
src/base/ftstream.c: read_bytes = stream->size - stream->pos;
|
||||
src/base/ftstream.c: FT_MEM_COPY( buffer, stream->base + stream->pos, read_bytes );
|
||||
src/base/ftstream.c: stream->pos += read_bytes;
|
||||
src/base/ftstream.c: *pbytes = (FT_Byte*)stream->cursor;
|
||||
src/base/ftstream.c: stream->cursor = NULL;
|
||||
src/base/ftstream.c: stream->limit = NULL;
|
||||
src/base/ftstream.c: if ( stream && stream->read )
|
||||
src/base/ftstream.c: FT_Memory memory = stream->memory;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor == 0 );
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: FT_Memory memory = stream->memory;
|
||||
src/base/ftstream.c: if ( count > stream->size )
|
||||
src/base/ftstream.c: count, stream->size ));
|
||||
src/base/ftstream.c: stream->base = (unsigned char*)ft_mem_qalloc( memory,
|
||||
src/base/ftstream.c: if ( FT_QALLOC( stream->base, count ) )
|
||||
src/base/ftstream.c: read_bytes = stream->read( stream, stream->pos,
|
||||
src/base/ftstream.c: stream->base, count );
|
||||
src/base/ftstream.c: FT_FREE( stream->base );
|
||||
src/base/ftstream.c: stream->cursor = stream->base;
|
||||
src/base/ftstream.c: stream->limit = stream->cursor + count;
|
||||
src/base/ftstream.c: stream->pos += read_bytes;
|
||||
src/base/ftstream.c: if ( stream->pos >= stream->size ||
|
||||
src/base/ftstream.c: stream->size - stream->pos < count )
|
||||
src/base/ftstream.c: stream->pos, count, stream->size ));
|
||||
src/base/ftstream.c: stream->cursor = stream->base + stream->pos;
|
||||
src/base/ftstream.c: stream->limit = stream->cursor + count;
|
||||
src/base/ftstream.c: stream->pos += count;
|
||||
src/base/ftstream.c: /* IMPORTANT: The assertion stream->cursor != 0 was removed, given */
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: FT_Memory memory = stream->memory;
|
||||
src/base/ftstream.c: ft_mem_free( memory, stream->base );
|
||||
src/base/ftstream.c: stream->base = NULL;
|
||||
src/base/ftstream.c: FT_FREE( stream->base );
|
||||
src/base/ftstream.c: stream->cursor = NULL;
|
||||
src/base/ftstream.c: stream->limit = NULL;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor );
|
||||
src/base/ftstream.c: if ( stream->cursor < stream->limit )
|
||||
src/base/ftstream.c: result = (FT_Char)*stream->cursor++;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor );
|
||||
src/base/ftstream.c: p = stream->cursor;
|
||||
src/base/ftstream.c: if ( p + 1 < stream->limit )
|
||||
src/base/ftstream.c: stream->cursor = p;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor );
|
||||
src/base/ftstream.c: p = stream->cursor;
|
||||
src/base/ftstream.c: if ( p + 1 < stream->limit )
|
||||
src/base/ftstream.c: stream->cursor = p;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor );
|
||||
src/base/ftstream.c: p = stream->cursor;
|
||||
src/base/ftstream.c: if ( p + 2 < stream->limit )
|
||||
src/base/ftstream.c: stream->cursor = p;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor );
|
||||
src/base/ftstream.c: p = stream->cursor;
|
||||
src/base/ftstream.c: if ( p + 3 < stream->limit )
|
||||
src/base/ftstream.c: stream->cursor = p;
|
||||
src/base/ftstream.c: FT_ASSERT( stream && stream->cursor );
|
||||
src/base/ftstream.c: p = stream->cursor;
|
||||
src/base/ftstream.c: if ( p + 3 < stream->limit )
|
||||
src/base/ftstream.c: stream->cursor = p;
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if ( stream->read( stream, stream->pos, &result, 1L ) != 1L )
|
||||
src/base/ftstream.c: if ( stream->pos < stream->size )
|
||||
src/base/ftstream.c: result = stream->base[stream->pos];
|
||||
src/base/ftstream.c: stream->pos++;
|
||||
src/base/ftstream.c: stream->pos, stream->size ));
|
||||
src/base/ftstream.c: if ( stream->pos + 1 < stream->size )
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if ( stream->read( stream, stream->pos, reads, 2L ) != 2L )
|
||||
src/base/ftstream.c: p = stream->base + stream->pos;
|
||||
src/base/ftstream.c: stream->pos += 2;
|
||||
src/base/ftstream.c: stream->pos, stream->size ));
|
||||
src/base/ftstream.c: if ( stream->pos + 1 < stream->size )
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if ( stream->read( stream, stream->pos, reads, 2L ) != 2L )
|
||||
src/base/ftstream.c: p = stream->base + stream->pos;
|
||||
src/base/ftstream.c: stream->pos += 2;
|
||||
src/base/ftstream.c: stream->pos, stream->size ));
|
||||
src/base/ftstream.c: if ( stream->pos + 2 < stream->size )
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if (stream->read( stream, stream->pos, reads, 3L ) != 3L )
|
||||
src/base/ftstream.c: p = stream->base + stream->pos;
|
||||
src/base/ftstream.c: stream->pos += 3;
|
||||
src/base/ftstream.c: stream->pos, stream->size ));
|
||||
src/base/ftstream.c: if ( stream->pos + 3 < stream->size )
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if ( stream->read( stream, stream->pos, reads, 4L ) != 4L )
|
||||
src/base/ftstream.c: p = stream->base + stream->pos;
|
||||
src/base/ftstream.c: stream->pos += 4;
|
||||
src/base/ftstream.c: stream->pos, stream->size ));
|
||||
src/base/ftstream.c: if ( stream->pos + 3 < stream->size )
|
||||
src/base/ftstream.c: if ( stream->read )
|
||||
src/base/ftstream.c: if ( stream->read( stream, stream->pos, reads, 4L ) != 4L )
|
||||
src/base/ftstream.c: p = stream->base + stream->pos;
|
||||
src/base/ftstream.c: stream->pos += 4;
|
||||
src/base/ftstream.c: stream->pos, stream->size ));
|
||||
src/base/ftstream.c: cursor = stream->cursor;
|
||||
src/base/ftstream.c: cursor = stream->cursor;
|
||||
src/base/ftstream.c: if ( cursor + len > stream->limit )
|
||||
src/base/ftstream.c: stream->cursor = cursor;
|
||||
src/base/ftsystem.c:#define STREAM_FILE( stream ) ( (FT_FILE*)stream->descriptor.pointer )
|
||||
src/base/ftsystem.c: stream->descriptor.pointer = NULL;
|
||||
src/base/ftsystem.c: stream->size = 0;
|
||||
src/base/ftsystem.c: stream->base = NULL;
|
||||
src/base/ftsystem.c: if ( !count && offset > stream->size )
|
||||
src/base/ftsystem.c: if ( stream->pos != offset )
|
||||
src/base/ftsystem.c: stream->descriptor.pointer = NULL;
|
||||
src/base/ftsystem.c: stream->pathname.pointer = (char*)filepathname;
|
||||
src/base/ftsystem.c: stream->base = NULL;
|
||||
src/base/ftsystem.c: stream->pos = 0;
|
||||
src/base/ftsystem.c: stream->read = NULL;
|
||||
src/base/ftsystem.c: stream->close = NULL;
|
||||
src/base/ftsystem.c: stream->size = (unsigned long)ft_ftell( file );
|
||||
src/base/ftsystem.c: if ( !stream->size )
|
||||
src/base/ftsystem.c: stream->descriptor.pointer = file;
|
||||
src/base/ftsystem.c: stream->read = ft_ansi_stream_io;
|
||||
src/base/ftsystem.c: stream->close = ft_ansi_stream_close;
|
||||
src/base/ftsystem.c: filepathname, stream->size ));
|
||||
src/base/ftobjs.c: stream->memory = memory;
|
||||
src/base/ftobjs.c: stream->pathname.pointer = args->pathname;
|
||||
src/base/ftobjs.c: stream->memory = memory; /* just to be certain */
|
||||
src/base/ftobjs.c: FT_Memory memory = stream->memory;
|
||||
src/base/ftobjs.c: FT_Memory memory = stream->memory;
|
||||
src/base/ftobjs.c: FT_FREE( stream->base );
|
||||
src/base/ftobjs.c: stream->size = 0;
|
||||
src/base/ftobjs.c: stream->base = NULL;
|
||||
src/base/ftobjs.c: stream->close = NULL;
|
||||
src/base/ftobjs.c: stream->close = close;
|
||||
src/base/ftobjs.c: if ( offset > stream->size )
|
||||
src/base/ftobjs.c: else if ( length > stream->size - offset )
|
||||
Binary file objs/gf.o matches
|
||||
Binary file objs/.libs/libfreetype.so.6.16.1 matches
|
||||
Binary file objs/.libs/gf.o matches
|
||||
Binary file objs/.libs/libfreetype.a matches
|
|
@ -413,8 +413,8 @@ FT_BEGIN_HEADER
|
|||
* Do not #undef these macros here since the build system might define
|
||||
* them for certain configurations only.
|
||||
*/
|
||||
/* #define FT_DEBUG_LEVEL_ERROR */
|
||||
/* #define FT_DEBUG_LEVEL_TRACE */
|
||||
#define FT_DEBUG_LEVEL_ERROR
|
||||
#define FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -68,7 +68,7 @@ FONT_MODULES += pcf
|
|||
FONT_MODULES += bdf
|
||||
|
||||
# GF font driver.
|
||||
#FONT_MODULES += gf
|
||||
FONT_MODULES += gf
|
||||
|
||||
# SFNT files support. If used without `truetype' or `cff', it supports
|
||||
# bitmap-only fonts within an SFNT wrapper.
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_SYSTEM_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
|
108
src/gf/gfdrivr.c
108
src/gf/gfdrivr.c
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* gfdrivr.h
|
||||
* gfdrivr.c
|
||||
*
|
||||
* FreeType font driver for TeX's GF FONT files
|
||||
*
|
||||
|
@ -20,6 +20,8 @@
|
|||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_TRUETYPE_IDS_H
|
||||
#include FT_SERVICE_FONT_FORMAT_H
|
||||
|
||||
|
||||
#include "gf.h"
|
||||
|
@ -89,6 +91,7 @@
|
|||
gf_cmap_char_next( FT_CMap gfcmap,
|
||||
FT_UInt32 *achar_code )
|
||||
{
|
||||
GF_CMap cmap = (GF_CMap)gfcmap;
|
||||
FT_UInt gindex = 0;
|
||||
FT_UInt32 result = 0;
|
||||
FT_UInt32 char_code = *achar_code + 1;
|
||||
|
@ -134,14 +137,14 @@
|
|||
FT_Memory memory;
|
||||
|
||||
|
||||
if ( !face h )
|
||||
if ( !face )
|
||||
return;
|
||||
|
||||
memory = FT_FACE_MEMORY( face );
|
||||
|
||||
gf_free_font( face->gf_glyph );
|
||||
|
||||
FT_FREE( /* */ );
|
||||
/* FT_FREE( ); */
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,14 +163,14 @@
|
|||
FT_UNUSED( params );
|
||||
|
||||
FT_TRACE2(( "GF driver\n" ));
|
||||
|
||||
printf("\nHi I am here\n\n");
|
||||
/* load font */
|
||||
error = gf_load_font( stream, face );
|
||||
if ( !error )
|
||||
goto Exit;
|
||||
|
||||
if ( FT_ERR_EQ( error, Unknown_File_Format )
|
||||
goto Exit
|
||||
if ( FT_ERR_EQ( error, Unknown_File_Format ) )
|
||||
goto Exit;
|
||||
|
||||
/* we have a gf font: let's construct the face object */
|
||||
|
||||
|
@ -180,7 +183,7 @@
|
|||
if ( face_index > 0 && ( face_index & 0xFFFF ) > 0 )
|
||||
{
|
||||
FT_ERROR(( "GF_Face_Init: invalid face index\n" ));
|
||||
BDF_Face_Done( gfface );
|
||||
GF_Face_Done( gfface );
|
||||
return FT_THROW( Invalid_Argument );
|
||||
}
|
||||
|
||||
|
@ -199,39 +202,39 @@
|
|||
if ( FT_NEW_ARRAY( gfface->available_sizes, 1 ) )
|
||||
goto Exit;
|
||||
|
||||
{
|
||||
FT_Bitmap_Size* bsize = gfface->available_sizes;
|
||||
FT_UShort x_res, y_res;
|
||||
{
|
||||
FT_Bitmap_Size* bsize = gfface->available_sizes;
|
||||
FT_UShort x_res, y_res;
|
||||
|
||||
FT_ZERO( bsize );
|
||||
bsize->width = (FT_Short) face->gf_glyph->font_bbx_w ;
|
||||
bsize->height = (FT_Short) face->gf_glyph->font_bbx_h ;
|
||||
bsize->size = face->gf_glyph->font_bbx_xoff ;
|
||||
FT_ZERO( bsize );
|
||||
bsize->width = (FT_Short) face->gf_glyph->font_bbx_w ;
|
||||
bsize->height = (FT_Short) face->gf_glyph->font_bbx_h ;
|
||||
bsize->size = face->gf_glyph->font_bbx_xoff ;
|
||||
|
||||
x_res = ;
|
||||
y_res = ;
|
||||
|
||||
bsize->y_ppem = face->gf_glyph->font_bbx_yoff ;
|
||||
bsize->x_ppem = face->gf_glyph->font_bbx_xoff ;
|
||||
}
|
||||
/*x_res = ;
|
||||
y_res = ;
|
||||
*/
|
||||
bsize->y_ppem = face->gf_glyph->font_bbx_yoff ;
|
||||
bsize->x_ppem = face->gf_glyph->font_bbx_xoff ;
|
||||
}
|
||||
|
||||
/* Charmaps */
|
||||
|
||||
{
|
||||
FT_CharMapRec charmap;
|
||||
{
|
||||
FT_CharMapRec charmap;
|
||||
|
||||
|
||||
charmap.encoding = FT_ENCODING_NONE;
|
||||
/* initial platform/encoding should indicate unset status? */
|
||||
charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
|
||||
charmap.encoding_id = TT_APPLE_ID_DEFAULT;
|
||||
charmap.face = root;
|
||||
charmap.encoding = FT_ENCODING_NONE;
|
||||
/* initial platform/encoding should indicate unset status? */
|
||||
charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
|
||||
charmap.encoding_id = TT_APPLE_ID_DEFAULT;
|
||||
charmap.face = face;
|
||||
|
||||
error = FT_CMap_New( gf_cmap_class, NULL, &charmap, NULL );
|
||||
error = FT_CMap_New( &gf_cmap_class, NULL, &charmap, NULL );
|
||||
|
||||
if ( error )
|
||||
goto Fail;
|
||||
}
|
||||
if ( error )
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
Fail:
|
||||
GF_Face_Done( gfface );
|
||||
|
@ -244,17 +247,16 @@
|
|||
GF_Size_Select( FT_Size size,
|
||||
FT_ULong strike_index )
|
||||
{
|
||||
GF_Face face = (GF_Face)size->face;
|
||||
|
||||
FT_UNUSED( strike_index );
|
||||
|
||||
|
||||
FT_Select_Metrics( size->face, 0 );
|
||||
|
||||
size->metrics.ascender = /* */ ;
|
||||
size->metrics.descender = /* */ ;
|
||||
size->metrics.max_advance = /* */ ;
|
||||
|
||||
/*
|
||||
size->metrics.ascender = ;
|
||||
size->metrics.descender = ;
|
||||
size->metrics.max_advance = ;
|
||||
*/
|
||||
return FT_Err_Ok;
|
||||
|
||||
}
|
||||
|
@ -278,12 +280,10 @@
|
|||
if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
|
||||
error = FT_Err_Ok;
|
||||
break;
|
||||
|
||||
case FT_SIZE_REQUEST_TYPE_REAL_DIM:
|
||||
if ( height == /* */ )
|
||||
if ( height == face->gf_glyph->font_bbx_h ) /* Preliminary */
|
||||
error = FT_Err_Ok;
|
||||
break;
|
||||
|
||||
default:
|
||||
error = FT_THROW( Unimplemented_Feature );
|
||||
break;
|
||||
|
@ -329,31 +329,31 @@
|
|||
if ( glyph_index > 0 )
|
||||
glyph_index--; /* revert to real index */
|
||||
else
|
||||
glyph_index = /* */; /* the `.notdef' glyph */
|
||||
glyph_index = 0; /* the `.notdef' glyph */
|
||||
|
||||
/* slot, bitmap => freetype, glyph => gflib */
|
||||
glyph = gf->gf_glyph->bm_table[glyph_index];
|
||||
|
||||
bitmap->rows = /* */ ;
|
||||
bitmap->width = /* */ ;
|
||||
bitmap->pitch = /* */ ; /* (In BDF) same as FT_Bitmap.pitch */
|
||||
/*
|
||||
bitmap->rows = ;
|
||||
bitmap->width = ;
|
||||
bitmap->pitch = ; *//* (In BDF) same as FT_Bitmap.pitch */
|
||||
|
||||
/* note: we don't allocate a new array to hold the bitmap; */
|
||||
/* we can simply point to it */
|
||||
ft_glyphslot_set_bitmap( slot, glyph.bitmap );
|
||||
|
||||
slot->format = FT_GLYPH_FORMAT_BITMAP;
|
||||
slot->bitmap_left = /* */ ;
|
||||
slot->bitmap_top = /* */ ;
|
||||
/*slot->bitmap_left = ;
|
||||
slot->bitmap_top = ;
|
||||
|
||||
slot->metrics.horiAdvance = (FT_Pos) /* */ ;
|
||||
slot->metrics.horiBearingX = (FT_Pos) /* */ ;
|
||||
slot->metrics.horiBearingY = (FT_Pos) /* */ ;
|
||||
slot->metrics.width = (FT_Pos) /* */ ;
|
||||
slot->metrics.height = (FT_Pos) /* */ ;
|
||||
|
||||
ft_synthesize_vertical_metrics( &slot->metrics, /* */ );
|
||||
slot->metrics.horiAdvance = (FT_Pos) ;
|
||||
slot->metrics.horiBearingX = (FT_Pos) ;
|
||||
slot->metrics.horiBearingY = (FT_Pos) ;
|
||||
slot->metrics.width = (FT_Pos) ;
|
||||
slot->metrics.height = (FT_Pos) ;
|
||||
|
||||
ft_synthesize_vertical_metrics( &slot->metrics, );
|
||||
*/
|
||||
Exit:
|
||||
return error;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ FT_BEGIN_HEADER
|
|||
typedef struct GF_GlyphRec_
|
||||
{
|
||||
FT_UInt code_min, code_max;
|
||||
GF_BITMAP bm_table;
|
||||
GF_Bitmap bm_table;
|
||||
double ds, hppp, vppp;
|
||||
FT_UInt font_bbx_w, font_bbx_h;
|
||||
FT_UInt font_bbx_xoff, font_bbx_yoff;
|
||||
|
|
202
src/gf/gflib.c
202
src/gf/gflib.c
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* gfdrivr.h
|
||||
* gflib.c
|
||||
*
|
||||
* FreeType font driver for TeX's GF FONT files
|
||||
*
|
||||
|
@ -21,6 +21,10 @@
|
|||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_SYSTEM_H
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include FT_ERRORS_H
|
||||
#include FT_TYPES_H
|
||||
|
||||
#include "gf.h"
|
||||
#include "gfdrivr.h"
|
||||
|
@ -36,6 +40,8 @@
|
|||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT trace_gflib
|
||||
|
||||
unsigned char bit_table[] = {
|
||||
0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
|
@ -67,7 +73,6 @@
|
|||
gf_read_uintn(FILE* fp, int size)
|
||||
{
|
||||
unsigned long v;
|
||||
|
||||
v = 0L;
|
||||
while (size >= 1)
|
||||
{
|
||||
|
@ -149,7 +154,7 @@
|
|||
*/
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
gf_read_glyph(FT_FILE* fp, GF_BITMAP bm)
|
||||
gf_read_glyph(FT_FILE* fp, GF_Bitmap bm)
|
||||
{
|
||||
long m, n;
|
||||
int paint_sw;
|
||||
|
@ -158,30 +163,29 @@
|
|||
long w, h, d;
|
||||
int m_b, k;
|
||||
unsigned char *ptr;
|
||||
FT_Error error = FT_Err_Ok;
|
||||
|
||||
switch (READ_UINT1(fp))
|
||||
{
|
||||
case GF_BOC:
|
||||
SKIP_N(fp, 4);
|
||||
SKIP_N(fp, 4);
|
||||
min_m = READ_INT4(fp);
|
||||
max_m = READ_INT4(fp);
|
||||
min_n = READ_INT4(fp);
|
||||
max_n = READ_INT4(fp);
|
||||
break;
|
||||
|
||||
case GF_BOC1:
|
||||
SKIP_N(fp, 1);
|
||||
del_m = (INT4)READ_UINT1(fp);
|
||||
max_m = (INT4)READ_UINT1(fp);
|
||||
del_n = (INT4)READ_UINT1(fp);
|
||||
max_n = (INT4)READ_UINT1(fp);
|
||||
min_m = max_m - del_m;
|
||||
min_n = max_n - del_n;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto Exit;
|
||||
case GF_BOC:
|
||||
SKIP_N(fp, 4);
|
||||
SKIP_N(fp, 4);
|
||||
min_m = READ_INT4(fp);
|
||||
max_m = READ_INT4(fp);
|
||||
min_n = READ_INT4(fp);
|
||||
max_n = READ_INT4(fp);
|
||||
break;
|
||||
case GF_BOC1:
|
||||
SKIP_N(fp, 1);
|
||||
del_m = (INT4)READ_UINT1(fp);
|
||||
max_m = (INT4)READ_UINT1(fp);
|
||||
del_n = (INT4)READ_UINT1(fp);
|
||||
max_n = (INT4)READ_UINT1(fp);
|
||||
min_m = max_m - del_m;
|
||||
min_n = max_n - del_n;
|
||||
break;
|
||||
default:
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
w = max_m - min_m + 1;
|
||||
|
@ -198,7 +202,7 @@
|
|||
goto Exit;
|
||||
}
|
||||
|
||||
memclr(bm->bitmap, h*((w+7)/8));
|
||||
memset(bm->bitmap, 0, h*((w+7)/8));
|
||||
bm->raster = (w+7)/8;
|
||||
bm->bbx_width = w;
|
||||
bm->bbx_height = h;
|
||||
|
@ -233,11 +237,10 @@
|
|||
{
|
||||
switch ((int)instr)
|
||||
{
|
||||
case GF_PAINT1:
|
||||
case GF_PAINT2:
|
||||
case GF_PAINT3:
|
||||
case GF_PAINT1:
|
||||
case GF_PAINT2:
|
||||
case GF_PAINT3:
|
||||
d = (UINT4)READ_UINTN(fp, (instr - GF_PAINT1 + 1));
|
||||
|
||||
Paint:
|
||||
if (paint_sw == 0)
|
||||
{
|
||||
|
@ -261,38 +264,32 @@
|
|||
}
|
||||
paint_sw = 1 - paint_sw;
|
||||
break;
|
||||
|
||||
case GF_SKIP0:
|
||||
case GF_SKIP0:
|
||||
m = min_m;
|
||||
n = n - 1;
|
||||
paint_sw = 0;
|
||||
break;
|
||||
|
||||
case GF_SKIP1:
|
||||
case GF_SKIP2:
|
||||
case GF_SKIP3:
|
||||
case GF_SKIP1:
|
||||
case GF_SKIP2:
|
||||
case GF_SKIP3:
|
||||
m = min_m;
|
||||
n = n - (UINT4)READ_UINTN(fp, (instr - GF_SKIP1 + 1)) - 1;
|
||||
paint_sw = 0;
|
||||
break;
|
||||
|
||||
case GF_XXX1:
|
||||
case GF_XXX2:
|
||||
case GF_XXX3:
|
||||
case GF_XXX4:
|
||||
case GF_XXX1:
|
||||
case GF_XXX2:
|
||||
case GF_XXX3:
|
||||
case GF_XXX4:
|
||||
k = READ_UINTN(fp, instr - GF_XXX1 + 1);
|
||||
SKIP_N(fp, k);
|
||||
break;
|
||||
|
||||
case GF_YYY:
|
||||
case GF_YYY:
|
||||
SKIP_N(fp, 4);
|
||||
break;
|
||||
|
||||
case GF_NO_OP:
|
||||
case GF_NO_OP:
|
||||
break;
|
||||
|
||||
default:
|
||||
FT_FREE(bm->bitmap);
|
||||
default:
|
||||
/* FT_FREE(bm->bitmap); */ /* Returning unnecessary errors TO BE CHECKED */
|
||||
bm->bitmap = NULL;
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto Exit;
|
||||
|
@ -309,8 +306,8 @@
|
|||
gf_load_font( FT_Stream stream,
|
||||
GF_Face face )
|
||||
{
|
||||
GF_GLYPH go;
|
||||
GF_BITMAP bm;
|
||||
GF_Glyph go;
|
||||
GF_Bitmap bm;
|
||||
UINT1 instr, d;
|
||||
UINT4 ds, check_sum, hppp, vppp;
|
||||
INT4 min_m, max_m, min_n, max_n;
|
||||
|
@ -321,23 +318,35 @@
|
|||
int bc, ec, nchars, i;
|
||||
FT_Error error = FT_Err_Ok;
|
||||
|
||||
FT_FILE *fp = stream->descriptor.pointer
|
||||
FT_FILE *fp = (FT_FILE*)stream->descriptor.pointer ;/* Errors with STREAM_FILE( stream )
|
||||
stream->descriptor.pointer is not allocating the file pointer properly*/
|
||||
go = face->gf_glyph;
|
||||
|
||||
char* st = (char*)stream->pathname.pointer;
|
||||
fp=fopen(st,"rb");
|
||||
|
||||
printf("\nHi I am here in gf_load_font 1 stream->pathname: %s %p\n\n", stream->pathname.pointer, *fp);
|
||||
|
||||
go = NULL;
|
||||
nchars = -1;
|
||||
|
||||
/* seek to post_post instr. */
|
||||
ft_fseek(fp, -1, SEEK_END);
|
||||
fseek(fp, -5, SEEK_END);
|
||||
|
||||
printf("\nHi I am here in gf_load_font -1\n\n");
|
||||
|
||||
while ((d = READ_UINT1(fp)) == 223)
|
||||
fseek(fp, -2, SEEK_CUR);
|
||||
|
||||
printf("\nHi I am here in gf_load_font 0\n\n");
|
||||
printf("\nHi I am here in gf_load_font d instr is %d\n\n",d);
|
||||
|
||||
if (d != GF_ID)
|
||||
{
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto ErrExit;
|
||||
}
|
||||
printf("\nHi I am here in gf_load_font 1\n\n");
|
||||
|
||||
fseek(fp, -6, SEEK_CUR);
|
||||
|
||||
|
@ -348,6 +357,8 @@
|
|||
goto ErrExit;
|
||||
}
|
||||
|
||||
printf("\nHi I am here in gf_load_font 2\n\n");
|
||||
|
||||
/* read pointer to post instr. */
|
||||
if ((ptr_post = READ_UINT4(fp)) == -1)
|
||||
{
|
||||
|
@ -355,6 +366,8 @@
|
|||
goto ErrExit;
|
||||
}
|
||||
|
||||
printf("\nHi I am here in gf_load_font 3\n\n");
|
||||
|
||||
/* goto post instr. and read it */
|
||||
fseek(fp, ptr_post, SEEK_SET);
|
||||
if (READ_UINT1(fp) != GF_POST)
|
||||
|
@ -363,6 +376,8 @@
|
|||
goto ErrExit;
|
||||
}
|
||||
|
||||
printf("\nHi I am here in gf_load_font 4\n\n");
|
||||
|
||||
ptr_p = READ_UINT4(fp);
|
||||
ds = READ_UINT4(fp);
|
||||
check_sum = READ_UINT4(fp);
|
||||
|
@ -373,8 +388,9 @@
|
|||
min_n = READ_INT4(fp);
|
||||
max_n = READ_INT4(fp);
|
||||
|
||||
printf("\nHi I am here in gf_load_font 5\n\n");
|
||||
gptr = ftell(fp);
|
||||
|
||||
printf("\nHi I am here in gf_load_font 6\n\n");
|
||||
|
||||
#if 0
|
||||
/* read min & max char code */
|
||||
|
@ -413,14 +429,19 @@
|
|||
#endif
|
||||
|
||||
nchars = ec - bc + 1;
|
||||
FT_ALLOC(go, GF_GlyphRec)
|
||||
goto ErrExit;
|
||||
go= (GF_Glyph)malloc(sizeof(GF_GlyphRec)); /* FT_ALLOC(go, sizeof(GF_GlyphRec)); goto ErrExit; */
|
||||
/* Returning unnecessary errors TO BE CHECKED */
|
||||
|
||||
FT_ALLOC_MULT(go->bm_table, GF_BitmapRec, nchars)
|
||||
goto ErrExit;
|
||||
printf("\nHi I am here in gf_load_font 7\n\n");
|
||||
|
||||
for (i = 0; i < nchars; i++)
|
||||
go->bm_table[i].bitmap = NULL;
|
||||
go->bm_table = (GF_Bitmap)malloc(nchars* sizeof(GF_BitmapRec));/* FT_ALLOC_MULT(go->bm_table, sizeof(GF_BitmapRec), nchars); goto ErrExit; */
|
||||
/* Returning unnecessary errors TO BE CHECKED */
|
||||
printf("\nHi I am here in gf_load_font 8\n\n");
|
||||
|
||||
/*for (i = 0; i < nchars; i++)
|
||||
go->bm_table[i] = NULL;*/
|
||||
|
||||
printf("\nHi I am here in gf_load_font 9\n\n");
|
||||
|
||||
go->ds = (double)ds/(1<<20);
|
||||
go->hppp = (double)hppp/(1<<16);
|
||||
|
@ -437,47 +458,46 @@
|
|||
fseek(fp, gptr, SEEK_SET);
|
||||
#endif
|
||||
|
||||
printf("\nHi I am here in gf_load_font 9.5\n");
|
||||
|
||||
for ( ; ; )
|
||||
{
|
||||
if ((instr = READ_UINT1(fp)) == GF_POST_POST)
|
||||
break;
|
||||
printf("\nHi I am here in gf_load_font 9.6 instr is %d\n\n", instr);
|
||||
switch ((int)instr)
|
||||
{
|
||||
|
||||
case GF_CHAR_LOC:
|
||||
code = READ_UINT1(fp);
|
||||
dx = (double)READ_INT4(fp)/(double)(1<<16);
|
||||
dy = (double)READ_INT4(fp)/(double)(1<<16);
|
||||
w = READ_INT4(fp);
|
||||
ptr = READ_INT4(fp);
|
||||
break;
|
||||
|
||||
case GF_CHAR_LOC0:
|
||||
code = READ_UINT1(fp);
|
||||
dx = (double)READ_INT1(fp);
|
||||
dy = (double)0;
|
||||
w = READ_INT4(fp);
|
||||
ptr = READ_INT4(fp);
|
||||
break;
|
||||
|
||||
default:
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto ErrExit;
|
||||
|
||||
case GF_CHAR_LOC:
|
||||
code = READ_UINT1(fp);
|
||||
dx = (double)READ_INT4(fp)/(double)(1<<16);
|
||||
dy = (double)READ_INT4(fp)/(double)(1<<16);
|
||||
w = READ_INT4(fp);
|
||||
ptr = READ_INT4(fp);
|
||||
break;
|
||||
printf("\nHi I am here in gf_load_font 9.7\n\n");
|
||||
case GF_CHAR_LOC0:
|
||||
code = READ_UINT1(fp);
|
||||
dx = (double)READ_INT1(fp);
|
||||
dy = (double)0;
|
||||
w = READ_INT4(fp);
|
||||
ptr = READ_INT4(fp);
|
||||
break;
|
||||
default:
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto ErrExit;
|
||||
}
|
||||
|
||||
printf("\nHi I am here in gf_load_font 10\n\n");
|
||||
optr = ft_ftell(fp);
|
||||
ft_fseek(fp, ptr, SEEK_SET);
|
||||
|
||||
bm = &go->bm_table[code - bc];
|
||||
if (gf_read_glyph(fp, bm) < 0)
|
||||
goto ErrExit;
|
||||
|
||||
printf("\nHi I am here in gf_load_font 11\n\n");
|
||||
bm->mv_x = dx;
|
||||
bm->mv_y = dy;
|
||||
ft_fseek(fp, optr, SEEK_SET);
|
||||
}
|
||||
return go;
|
||||
|
||||
ErrExit:
|
||||
printf("*ERROR\n");
|
||||
|
@ -485,29 +505,29 @@
|
|||
{
|
||||
if (go->bm_table != NULL)
|
||||
{
|
||||
for (i = 0; i < nchars; i++)
|
||||
FT_FREE(go->bm_table[i].bitmap);
|
||||
for (i = 0; i < nchars; i++){}
|
||||
/* FT_FREE(go->bm_table[i].bitmap); */
|
||||
}
|
||||
FT_FREE(go->bm_table);
|
||||
/* FT_FREE(go->bm_table); */ /* Returning unnecessary errors TO BE CHECKED */
|
||||
}
|
||||
FT_FREE(go);
|
||||
return NULL;
|
||||
/* FT_FREE(go); */ /* Returning unnecessary errors TO BE CHECKED */
|
||||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
gf_free_font( GF_Glyph go )
|
||||
{
|
||||
int i=0, nchars =sizeof(go->bm_table);
|
||||
if (go != NULL)
|
||||
{
|
||||
if (go->bm_table != NULL)
|
||||
{
|
||||
for (i = 0; i < nchars; i++)
|
||||
FT_FREE(go->bm_table[i].bitmap);
|
||||
for (i = 0; i < nchars; i++){}
|
||||
/* FT_FREE(go->bm_table[i].bitmap); */ /* To be verified from Vflib */
|
||||
}
|
||||
FT_FREE(go->bm_table);
|
||||
/* FT_FREE(go->bm_table); */ /* Returning unnecessary errors TO BE CHECKED */
|
||||
}
|
||||
FT_FREE(go);
|
||||
/* FT_FREE(go); */ /* Returning unnecessary errors TO BE CHECKED */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ FTMODULE_H_COMMANDS += GF_DRIVER
|
|||
|
||||
define GF_DRIVER
|
||||
$(OPEN_DRIVER) FT_Driver_ClassRec, gf_driver_class $(CLOSE_DRIVER)
|
||||
$(ECHO_DRIVER)gf $(ECHO_DRIVER_DESC)gf TeX's bitmap fonts$(ECHO_DRIVER_DONE)
|
||||
$(ECHO_DRIVER)gf $(ECHO_DRIVER_DESC)gf TeX's bitmap fonts$(ECHO_DRIVER_DONE)
|
||||
endef
|
||||
|
||||
# EOF
|
||||
|
|
|
@ -26,27 +26,27 @@ GF_COMPILE := $(CC) $(ANSIFLAGS) \
|
|||
|
||||
# gf driver sources (i.e., C files)
|
||||
#
|
||||
BDF_DRV_SRC := $(BDF_DIR)/gflib.c \
|
||||
$(BDF_DIR)/gfdrivr.c
|
||||
GF_DRV_SRC := $(GF_DIR)/gflib.c \
|
||||
$(GF_DIR)/gfdrivr.c
|
||||
|
||||
|
||||
# gf driver headers
|
||||
#
|
||||
GF_DRV_H := $(BDF_DIR)/gf.h \
|
||||
$(BDF_DIR)/gfdrivr.h \
|
||||
$(BDF_DIR)/gferror.h
|
||||
GF_DRV_H := $(GF_DIR)/gf.h \
|
||||
$(GF_DIR)/gfdrivr.h \
|
||||
$(GF_DIR)/gferror.h
|
||||
|
||||
# gf driver object(s)
|
||||
#
|
||||
# GF_DRV_OBJ_M is used during `multi' builds
|
||||
# GF_DRV_OBJ_S is used during `single' builds
|
||||
#
|
||||
GF_DRV_OBJ_M := $(GF_DRV_SRC:$(BDF_DIR)/%.c=$(OBJ_DIR)/%.$O)
|
||||
GF_DRV_OBJ_M := $(GF_DRV_SRC:$(GF_DIR)/%.c=$(OBJ_DIR)/%.$O)
|
||||
GF_DRV_OBJ_S := $(OBJ_DIR)/gf.$O
|
||||
|
||||
# gf driver source file for single build
|
||||
#
|
||||
GF_DRV_SRC_S := $(BDF_DIR)/gf.c
|
||||
GF_DRV_SRC_S := $(GF_DIR)/gf.c
|
||||
|
||||
|
||||
# gf driver - single object
|
||||
|
@ -57,7 +57,7 @@ $(GF_DRV_OBJ_S): $(GF_DRV_SRC_S) $(GF_DRV_SRC) $(FREETYPE_H) $(GF_DRV_H)
|
|||
|
||||
# gf driver - multiple objects
|
||||
#
|
||||
$(OBJ_DIR)/%.$O: $(GF_DIR)/%.c $(FREETYPE_H) $(BDF_DRV_H)
|
||||
$(OBJ_DIR)/%.$O: $(GF_DIR)/%.c $(FREETYPE_H) $(GF_DRV_H)
|
||||
$(GF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue