freetype
[Top][All Lists]
Advanced

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

[ft] use of FT_New_Library function


From: Martin Štrympl
Subject: [ft] use of FT_New_Library function
Date: Fri, 6 Mar 2015 17:34:55 +0100

I am using  FT_New_Library function with a pointer to filled FT_Memory  object.


It starts working good, but if I call FT function FT_Open_Face, it
fails (SIGSEG) during calling ft_mem_qalloc function. GNU Debugger
say, it call bad function from this function.

My initialization code is:

      // set library instance with own memory manager
      {
        FT_MemoryRec d_memory;

        d_memory.user = ps_pack;
        d_memory.alloc = ESEM_Font_Font_FreeType2_FT_Alloc_Func;
        d_memory.free = ESEM_Font_Font_FreeType2_FT_Free_Func;
        d_memory.realloc = ESEM_Font_Font_FreeType2_FT_Realloc_Func;

        d_error = FT_New_Library(&d_memory, &ps_ext->d_library);
        if (d_error!=0)
        {
          break;
        }

        FT_Add_Default_Modules(ps_ext->d_library);
      }


Can be a problem, that FT_Memory object isn't exist for all time I am
using the library? I check the documentation of FT_New_Library, but
there is not written, that I have to keep FT_Memory object in memory.
But it looks like it can be a problem.



reply via email to

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