freetype-devel
[Top][All Lists]
Advanced

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

[Devel] MMs with 16bit-platform


From: Wolfgang Domröse
Subject: [Devel] MMs with 16bit-platform
Date: Mon, 16 Jul 2001 14:00:56 GMT

As I told you, there is an endless loop when I try to load MM-Fonts on my 
16-bit-platform. Here is the reason:



 FT_LOCAL_DEF FT_Error
  PS_Table_Add( PS_Table*  table,
                FT_Int     index,
                void*      object,
                FT_Int     length )
  {
    if ( index < 0 || index > table->max_elems )
    {
      FT_ERROR(( "PS_Table_Add: invalid index\n" ));
      return PSaux_Err_Invalid_Argument;
    }

    /* grow the base block if needed */
    if ( table->cursor + length > table->capacity )
    {
      FT_Error  error;
      FT_Int    new_size = table->capacity;                                     
        <--- this must be FT_Long (both)


      while ( new_size < table->cursor + length )             <---here endless,
                                                                                
                                                                                
                 because new_size is more then 0x7FFF
      {
        new_size += 1024;
      }

      error = reallocate_t1_table( table, new_size );
      if ( error )
        return error;
    }

So at least this definition has to be changed too:


  struct  PS_Table_
  {
    FT_Byte*        block;          /* current memory block           */
    FT_Int          cursor;         /* current cursor in memory block */     
<--- long
    FT_Int          capacity;       /* current size of memory block   */     
<--- long
    FT_Long         init;

    FT_Int          max_elems;                                                
<--- ?
    FT_Int          num_elems;
    FT_Byte**       elements;       /* addresses of table elements */
    FT_Int*         lengths;        /* lengths of table elements   */         
<--- ?

    FT_Memory       memory;
    PS_Table_Funcs  funcs;

  };


There might be some other problems in the table-functions.


Can you change this?



Wolfgang Domroese




reply via email to

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