[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Freetype 1.3.1
From: |
David Turner |
Subject: |
Re: Freetype 1.3.1 |
Date: |
Thu, 18 May 2000 10:13:56 +0200 |
Hy Dany,
Thanks for your message. Actually, the bug you describe has been fixed
last week in the current snapshot. It also includes many fixes to library
extensions that didn't compile well in thread-safe mode. Please grab it
from one of our mirrors.
Best Regards,
- David
Dany Amiouny a écrit :
>
> Part 1.1 Type: Plain Text (text/plain)
> Encoding: quoted-printable
Hello,
I have recently downloaded version 1.3.1 of the Freetype library. We are
considering including this library in our products.
First of all, I would like to thank you for this excellent work which has given
us much insight to the internals of TrueType.
We are in a situation where we need to compile using
TT_CONFIG_OPTION_THREAD_SAFE and memory-mapped files inspired from the unix
version you supply:
I have found that this function will not compile under this situation:
/*******************************************************************
*
* Function : TT_Forget_Frame
*
* Description : Releases a cached frame after reading.
*
* Input : None
*
* Output : SUCCESS on success. FAILURE on error.
*
******************************************************************/
EXPORT_FUNC
TT_Error TT_Forget_Frame( FRAME_ARG )
{
if ( CUR_Frame.address == NULL )
return TT_Err_Nested_Frame_Access;
/* If we were using a duplicate in case of overflow, free it now */
if ( CUR_Frame.address < (Byte*)CUR_Stream->map->base ||
CUR_Frame.address >= (Byte*)CUR_Stream->map->base +
CUR_Stream->map->size )
FREE( CUR_Frame.address );
ZERO_Frame( files.frame );
return TT_Err_Ok;
}
changing it to :
/*******************************************************************
*
* Function : TT_Forget_Frame
*
* Description : Releases a cached frame after reading.
*
* Input : None
*
* Output : SUCCESS on success. FAILURE on error.
*
* AMYUNI : added STREAM_ARGS as a first parameter
*
******************************************************************/
EXPORT_FUNC
TT_Error TT_Forget_Frame( STREAM_ARGS FRAME_ARG )
{
if ( CUR_Frame.address == NULL )
return TT_Err_Nested_Frame_Access;
/* If we were using a duplicate in case of overflow, free it now */
if ( CUR_Frame.address < (Byte*)CUR_Stream->map->base ||
CUR_Frame.address >= (Byte*)CUR_Stream->map->base +
CUR_Stream->map->size )
FREE( CUR_Frame.address );
ZERO_Frame( CUR_Frame );
return TT_Err_Ok;
}
solved the problem.
The following function also caused a crash in our test application:
/*******************************************************************
*
* Function : TT_Use_Stream
*
* Description : Copies or duplicates a given stream.
*
* Input : org_stream original stream
* stream target stream (copy or duplicate)
*
* Output : Error code. The output stream is set to NULL in
* case of Failure.
*
******************************************************************/
EXPORT_FUNC
TT_Error TT_Use_Stream( TT_Stream input_stream,
TT_Stream* copy )
{
TT_Error error;
PStream_Rec stream_rec;
PStream_Rec copy_rec;
stream_rec = STREAM2REC( input_stream );
if ( ALLOC( copy_rec, sizeof ( TStream_Rec ) ) )
goto Fail;
//AMYUNI: copy the object !!!
MEM_Copy( copy_rec, stream_rec, sizeof( TT_Stream ) );
HANDLE_Set( *copy, copy_rec );
copy_rec->map->refcount++;
copy_rec->pos = 0;
return TT_Err_Ok;
Fail:
HANDLE_Set( *copy, NULL );
return error;
}
The stream object does not seem to be copied correctly in your implementation.
Please let me know if you find any drawbacks for the above modifications.
Thanks again,
Dany Amiouny
AMYUNI Consultants
www.amyuni.com
- Freetype 1.3.1, Dany Amiouny, 2000/05/15
- Re: Freetype 1.3.1,
David Turner <=