freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Freetype FT_Request_Size() crashes


From: suzuki toshiya
Subject: Re: [ft] Freetype FT_Request_Size() crashes
Date: Sun, 01 Jul 2012 17:11:33 +0900
User-agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080406)

Dear Paul,

I could reproduce the crash by http://aquawicket.com/FreetypeBug.zip ,
but I could not reproduce it with smaller program like attached one.
Does this bug occur when a program uses both of SDL and FreeType2?

Regards,
mpsuzuki

suzuki toshiya wrote:
> I will check.
> 
> Regards,
> mpsuzuki
> 
> Werner LEMBERG wrote (2012/06/12 14:49):
>> [Forwarding to the list since I don't use Windows.  Anyone interested
>> in looking into this?]
>>
>>
>>     Werner
>>
>> ======================================================================
>>
>> From: Paul Dean <address@hidden>
>> Subject: RE: [ft] Freetype FT_Request_Size() crashes
>> Date: Mon, 11 Jun 2012 17:40:24 -0500
>>
>>> I'm still tearing out my hair on this one.  It seems SDL 2.0 is
>>> conflicting with freetype.  I know a few sloppy fixes on windows. I
>>> can't for the life of me figure out how to get them to get along on
>>> Mac or android. My windows sloppy fixes do not fix MAC or Android.
>>> I've decided to create a minimal SDL 2.0 / Freetype 2.4.9 project for
>>> windows that will reproduce this crash.  The debug version on windows
>>> will work but the release build will show the crash.
>>> The only thing the project requires is Cmake and Visual C++ 2008 or
>>> higher.  No other dependencies needed. Just cmake and compile.
>>> http://aquawicket.com/FreetypeBug.zip
>>
>> _______________________________________________
>> Freetype mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/freetype
> 
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/freetype

#include <stdio.h>
#include <ft2build.h>
#include FT_FREETYPE_H


int main(int argc, char** argv) {
  FT_Library  ftLib;
  FT_Face     ftFace;
  FT_Error    err;

  if ( argc < 2 ) {
    fprintf( stderr, "1 argument is needed\n" );
    return 1;
  }


  err = FT_Init_FreeType( &ftLib );
  if ( err ) {
    fprintf( stderr, "FT_Init_FreeType() returns an error = %d\n", err );
    return err;
  }
  fprintf( stderr, "FT_Init_FreeType() ok\n" );

  err = FT_New_Face( ftLib, argv[1], 0, &ftFace );
  if ( err ) {
    fprintf( stderr, "FT_New_Face() returns an error = %d\n", err );
    return err;
  }
  fprintf( stderr, "FT_New_Face() ok\n" );

  err = FT_Set_Char_Size( ftFace, 0L, 20*64, 72, 72 );
  if ( err ) {
    fprintf( stderr, "FT_Set_Char_Size() returns an error = %d\n", err );
    return err;
  }
  fprintf( stderr, "FT_Set_Char_Size() ok\n" );

  FT_Done_Face( ftFace );

  FT_Done_FreeType( ftLib );

  return 0;
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]