/****************************************************************************/
/*                                                                          */
/*  Erwin Dieterich,  15. 10. 1997                                          */
/*                  - 16. 12. 1997                                          */
/*                                                                          */
/*  TT_ErrToString: translate error codes to character strings              */
/*                                                                          */
/****************************************************************************/
  
#include "errstr18.h"



char* TT_ErrToString18(int error)
{
  switch (error)
  {
    /* ----- high-level API error codes -----*/
  case 0:
    return (gettext("Successful function call, no error"));
  case 1:
    return (gettext("Invalid face handle"));
  case 2:
    return (gettext("Invalid instance handle"));
  case 3:
    return (gettext("Invalid glyph handle"));
  case 4:
    return (gettext("Invalid charmap handle"));
  case 5:
    return (gettext("Invalid result address"));
  case 6:
    return (gettext("Invalid glyph Index"));
  case 7:
    return (gettext("Invalid argument"));
  case 8:
    return (gettext("Could not open file"));
  case 9:
    return (gettext("File is not a TrueType collection"));
  case 10:
    return (gettext("Mandatory table missing"));
  case 11:
    return (gettext("Invalid horizontal metrics (HMTX table broken)"));
  case 12:
    return (gettext("Invalid charmap format"));
  case 16:
    return (gettext("Invalid file format"));
      
  case 32:
    return (gettext("Invalid engine"));
  case 33:
    return (gettext("Too many extensions (max: 8)"));
  case 34:
    return (gettext("Extensions unsupported"));
  case 35:
    return (gettext("Invalid extension id"));
      
  case 128:
    return (gettext("Max profile table missing"));
  case 129:
    return (gettext("Header table missing"));
  case 130:
    return (gettext("Horizontal header missing"));
  case 131:
    return (gettext("Locations table missing"));
  case 132:
    return (gettext("Name table missing"));
  case 133:
    return (gettext("Character encoding tables missing"));
  case 134:
    return (gettext("Hmtx table missing"));
  case 135:
    return (gettext("OS/2 tabel missing"));
  case 136:
    return (gettext("PostScript table missing"));
      
      
  /* ----- memory component error codes -----*/
  case 256:
    return (gettext("Out of memory"));
      
      
  /* ----- file component error codes -----*/
  case 512:
    return (gettext("Invalid file offset"));
  case 513:
    return (gettext("Invalid file read"));
  case 514:
    return (gettext("Invalid frame access"));
      
      
  /* ----- file component error codes -----*/
  case 768:
    return (gettext("Too many points"));
  case 769:
    return (gettext("Too many contours"));
  case 770:
    return (gettext("Invalid composite glyph"));
  case 771:
    return (gettext("Too many instructions"));
      
      
  /* ----- byte-code interpreter error codes -----*/
  case 1024:
    return (gettext("Invalid opcode"));
  case 1025:
    return (gettext("Too few arguments"));
  case 1026:
    return (gettext("Stack overflow"));
  case 1027:
    return (gettext("Code overflow"));
  case 1028:
    return (gettext("Bad argument"));
  case 1029:
    return (gettext("Divide by zero"));
  case 1030:
    return (gettext("Storage overflow"));
  case 1031:
    return (gettext("Control value table overflow"));
  case 1032:
    return (gettext("Invalid reference"));
  case 1033:
    return (gettext("Invalid distance"));
  case 1034:
    return (gettext("Interpolate twilight points"));
  case 1035:
    return (gettext("Debug opcode found"));
  case 1036:
    return (gettext("ENDF in byte-code stream"));
  case 1037:
    return (gettext("Out of code ranges"));
  case 1038:
    return (gettext("Nested function definitions"));
  case 1039:
    return (gettext("Invalid code range"));
      
      
  /* ----- internal failure error codes -----*/
  case 1280:
    return (gettext("Nested frame access"));
  case 1281:
    return (gettext("Invalid cache list"));
  case 1282:
      return (gettext("Could not find context"));
  case 1283:
    return (gettext("Unlisted object"));
      
      
  /* ----- scan-line converter error codes -----*/
  case 1536:
    return (gettext("Raster pool overflow"));
  case 1537:
    return (gettext("Raster negative height"));
  case 1538:
    return (gettext("Raster invalid value"));
  case 1539:
    return (gettext("Raster not initialized"));
      
      
  /* ----- engine extensions error codes -----*/
  case 2560:
    return (gettext("Invalid kerning table format"));
      
      
  /* ----- unknown error code -----*/
  default:
    return (gettext("Invalid Error Number"));
  }
}
