Hi Werner,

Here is the 92 enum's currently documented, massaged to fit into freetype's 
FT_Err_* , as FT_Err_FONTVAL_*

As FreeType only have 95 before that, this doubts your original list to 187.

Here is a run through:

- 76 of them were documented in FontVal 1.0, 2 AFAIK unused, 4 are emitted by
the C# side of things so in reality irrelevant:

- - A_ExceptionUnhandled: generic "shit happens". Currently also covers 
FreeType existing
with an error code, but I think I'll split off and create a 93th to distinguish 
between Freetype errors
and non-Freetype errors.

- - E_rasterization: when font does not pass preliminary check and does not 
proceed
to be analysed hinting-instructions wise; like missing other tables, etc.

-- P_rasterization: this isn't an error but the absence of everything else.

-- I_rasterization: CFF font, not going through freetype.


- "W_Need_Newer_FreeType" was the 77th added two years ago, as a place-holder
for eventually things being merged into freetype and doing version checks. 
Currently unused.

- the 15 *_FT_* ones were added between FontVal 2.0 and 2.1. I know we don't 
agree on 
W_FT_VALUE_OUT_OF_RANGE_SLOOP_ZERO . I'll think about it some more;
the actual cases affected are in fact small.

- I_FT_Error_Supplymentary_Info is a generic "more information" delaying and 
anticipating
a "A_ExceptionUnhandled" .

- I'll likely add a 93th to split off generic 'misc shit happens' from 
'freetype shit happens'.

====

Although I did put a place holder for freetype version check two years ago, and 
intended future code
to be merged/mergeable at some point, I am increasingly not convinced that it 
is a good idea for the clutter
it would create. I don't think you would like it either - doubling the number 
of error codes
for one application's use.

But anyway, this is to standardise the interface, to prevent time being wasted 
by/on people forking
the code in an incompatible way in the future.

If you want to re-arrange/re-number them, etc, I am okay with it, as long as 
the last part
e.g. "I_FT_Error_Supplymentary_Info" of the string-form stays the same. (or 
I'll need to change
the c# side to cope).


P.S. curiously the incompatible fork uses 72 enums, but at least one from the 
C# side.
So it only has 71 of the correct enums. Sigh.


 


 
diff --git a/include/freetype/fterrdef.h b/include/freetype/fterrdef.h
index 6a6dc85b8..03fcf28d7 100644
--- a/include/freetype/fterrdef.h
+++ b/include/freetype/fterrdef.h
@@ -276,5 +276,284 @@
 
   /* */
 
+  /* A6000 */
+  FT_ERRORDEF_( FONTVAL_A_ExceptionUnhandled,                0x0100,
+                "An exception occurred during rasterization testing" )
+  /* E6000 */
+  FT_ERRORDEF_( FONTVAL_E_3_USED_FOR_PERIOD,                 0x0101,
+                "Reserved value of 3 used for period" )
+  /* E6001 */
+  FT_ERRORDEF_( FONTVAL_E_BITS_10_AND_13_SET,                0x0102,
+                "Bits 10 and 13 are set, they are mutually exclusive" )
+  /* E6002 */
+  FT_ERRORDEF_( FONTVAL_E_BITS_8_AND_11_SET,                 0x0103,
+                "Bits 8 and 11 are set, they are mutually exclusive" )
+  /* E6003 */
+  FT_ERRORDEF_( FONTVAL_E_BITS_9_AND_12_SET,                 0x0104,
+                "Bits 9 and 12 are set, they are mutually exclusive" )
+  /* E6004 */
+  FT_ERRORDEF_( FONTVAL_E_CONTOUR_OUT_OF_RANGE,              0x0105,
+                "Contour out of range" )
+  /* E6005 */
+  FT_ERRORDEF_( FONTVAL_E_CVT_OUT_OF_RANGE,                  0x0106,
+                "CVT Out of range" )
+  /* E6006 */
+  FT_ERRORDEF_( FONTVAL_E_DIVIDE_BY_ZERO,                    0x0107,
+                "Divide by zero" )
+  /* E6007 */
+  FT_ERRORDEF_( FONTVAL_E_EIF_WITHOUT_IF,                    0x0108,
+                "EIF found without IF" )
+  /* E6008 */
+  FT_ERRORDEF_( FONTVAL_E_ELSE_WITHOUT_EIF,                  0x0109,
+                "ELSE found without EIF" )
+  /* E6009 */
+  FT_ERRORDEF_( FONTVAL_E_ELSE_WITHOUT_IF,                   0x010A,
+                "ELSE found without IF" )
+  /* E6010 */
+  FT_ERRORDEF_( FONTVAL_E_ENDF_BEYOND_64K_OF_FDEF,           0x010B,
+                "ENDF beyond 64K of FDEF" )
+  /* E6011 */
+  FT_ERRORDEF_( FONTVAL_E_ENDF_BEYOND_64K_OF_IDEF,           0x010C,
+                "ENDF beyond 64K of IDEF" )
+  /* E6012 */
+  FT_ERRORDEF_( FONTVAL_E_ENDF_EXECUTED,                     0x010D,
+                "ENDF found without FDEF or IDEF" )
+  /* E6013 */
+  FT_ERRORDEF_( FONTVAL_E_EXCEEDS_INSTR_DEFS_IN_MAXP,        0x010E,
+                "IDEF exceeds max instruction defs in maxp" )
+  /* E6014 */
+  FT_ERRORDEF_( FONTVAL_E_FDEF_FOUND_IN_FDEF,                0x010F,
+                "FDEF found within FDEF - ENDF pair" )
+  /* E6015 */
+  FT_ERRORDEF_( FONTVAL_E_FDEF_FOUND_IN_IDEF,                0x0110,
+                "FDEF found within IDEF - ENDF pair" )
+  /* E6016 */
+  FT_ERRORDEF_( FONTVAL_E_FDEF_OUT_OF_RANGE,                 0x0111,
+                "FDEF out of range" )
+  /* E6017 */
+  FT_ERRORDEF_( FONTVAL_E_FDEF_SPACE_NOT_DEFINED,            0x0112,
+                "Function definition space not defined" )
+  /* E6018 */
+  FT_ERRORDEF_( FONTVAL_E_FDEF_WITHOUT_ENDF,                 0x0113,
+                "FDEF found without ENDF" )
+  /* E6019 */
+  FT_ERRORDEF_( FONTVAL_E_FUCOORDINATE_OUT_OF_RANGE,         0x0114,
+                "Funit coordinate out of range must be -16384 .. 16383" )
+  /* E6020 */
+  FT_ERRORDEF_( FONTVAL_E_FUNCTION_NOT_DEFINED,              0x0115,
+                "Function not defined" )
+  /* E6021 */
+  FT_ERRORDEF_( FONTVAL_E_IDEF_FOUND_IN_FDEF,                0x0116,
+                "IDEF found within FDEF - ENDF pair" )
+  /* E6022 */
+  FT_ERRORDEF_( FONTVAL_E_IDEF_FOUND_IN_IDEF,                0x0117,
+                "IDEF found within IDEF - ENDF pair" )
+  /* E6023 */
+  FT_ERRORDEF_( FONTVAL_E_IDEF_WITHOUT_ENDF,                 0x0118,
+                "IDEF found without ENDF" )
+  /* E6024 */
+  FT_ERRORDEF_( FONTVAL_E_IF_WITHOUT_EIF,                    0x0119,
+                "IF found without corresponding EIF" )
+  /* E6025 */
+  FT_ERRORDEF_( FONTVAL_E_INST_OPCODE_TO_LARGE,              0x011A,
+                "Instruction OpCode is to large. Must be between 0 and 255" )
+  /* E6026 */
+  FT_ERRORDEF_( FONTVAL_E_INSTR_DEFD_BY_FS,                  0x011B,
+                "Instruction already defined by rasterizer" )
+  /* E6027 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_FLAG,                      0x011C,
+                "Invalid Instruction flag" )
+  /* E6028 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_INSTRUCTION,               0x011D,
+                "Invalid Instruction" )
+  /* E6029 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_MAXZONES_IN_MAXP,          0x011E,
+                "Invalid maxZones in maxp table" )
+  /* E6030 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_STACK_ACCESS,              0x011F,
+                "Attempt to access stack element out of range" )
+  /* E6031 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_ZONE,                      0x0120,
+                "Invalid zone" )
+  /* E6032 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_ZONE_IN_IUP,               0x0121,
+                "ZP2 in IUP does not point to zone 1" )
+  /* E6033 */
+  FT_ERRORDEF_( FONTVAL_E_INVALID_ZONE_NO_TWI,               0x0122,
+                "No twilight zone defined. Invalid zone" )
+  /* E6034 */
+  FT_ERRORDEF_( FONTVAL_E_JMP_BEFORE_BEGINNING,              0x0123,
+                "Jump before beginning of program or function" )
+  /* E6035 */
+  FT_ERRORDEF_( FONTVAL_E_JMP_BEYOND_2MORE_THAN_END,         0x0124,
+                "Jump beyond 2 bytes past end of function or program" )
+  /* E6036 */
+  FT_ERRORDEF_( FONTVAL_E_MATH_OVERFLOW,                     0x0125,
+                "Math overflow" )
+  /* E6037 */
+  FT_ERRORDEF_( FONTVAL_E_NOT_CALLED_FROM_PREPROGRAM,        0x0126,
+                "Not called from pre-program" )
+  /* E6038 */
+  FT_ERRORDEF_( FONTVAL_E_OVERFLOW_INST_PTR,                 0x0127,
+                "Overflow Instruction Stream" )
+  /* E6039 */
+  FT_ERRORDEF_( FONTVAL_E_POINT_OUT_OF_RANGE,                0x0128,
+                "Point out of range" )
+  /* E6040 */
+  FT_ERRORDEF_( FONTVAL_E_PREPROGAM_ZONE_NOT_TWI,            0x0129,
+                "Zone referenced in pre-program is not the twilight zone" )
+  /* E6041 */
+  FT_ERRORDEF_( FONTVAL_E_REFPOINT_USED_BUT_NOT_SET,         0x012A,
+                "Reference point used but not set" )
+  /* E6042 */
+  FT_ERRORDEF_( FONTVAL_E_RESERVED_BIT_SET,                  0x012B,
+                "At least one reserved bit is set" )
+  /* E6043 */
+  FT_ERRORDEF_( FONTVAL_E_RP1_RP2_SAME_POS_ON_PROJ,          0x012C,
+                "RP1 and RP2 have the same position on the projection vector" )
+  /* E6044 */
+  FT_ERRORDEF_( FONTVAL_E_SELECTOR_INVALID,                  0x012D,
+                "Selector invalid" )
+  /* E6045 */
+  FT_ERRORDEF_( FONTVAL_E_STACK_OVERFLOW,                    0x012E,
+                "Stack Overflow" )
+  /* E6046 */
+  FT_ERRORDEF_( FONTVAL_E_STACK_UNDERFLOW,                   0x012F,
+                "Stack Underflow" )
+  /* E6047 */
+  FT_ERRORDEF_( FONTVAL_E_STORAGE_OUT_OF_RANGE,              0x0130,
+                "Storage index out of range" )
+  /* E6048 */
+  FT_ERRORDEF_( FONTVAL_E_STORE_INDEX_NOT_WRITTEN_TO,        0x0131,
+                "Storage location not written to" )
+  /* E6049 */
+  FT_ERRORDEF_( FONTVAL_E_TWILIGHT_ZONE_PT_NOT_SET,          0x0132,
+                "Twilight zone point not set" )
+  /* E6050 */
+  FT_ERRORDEF_( FONTVAL_E_VALUE_INVALID_0_OR_1,              0x0133,
+                "Value invalid should be 0 or 1" )
+  /* E6051 */
+  FT_ERRORDEF_( FONTVAL_E_VALUE_INVALID_0_OR_2,              0x0134,
+                "Value invalid should be 0 or 2" )
+  /* E6052 */
+  FT_ERRORDEF_( FONTVAL_E_VALUE_OUT_OF_RANGE,                0x0135,
+                "Value out of range" )
+  /* E6053 */
+  FT_ERRORDEF_( FONTVAL_E_VALUE_TO_LARGE_FOR_INT16,          0x0136,
+                "Value exceeds capacity of 2 byte number" )
+  /* E6054 */
+  FT_ERRORDEF_( FONTVAL_E_VALUE_TO_LARGE_FOR_INT8,           0x0137,
+                "Value exceeds capacity of 1 byte number" )
+  /* E6055 */
+  FT_ERRORDEF_( FONTVAL_E_VALUE_TO_SMALL,                    0x0138,
+                "Value too small" )
+  /* E6056 */
+  FT_ERRORDEF_( FONTVAL_E_VECTOR_XY_INVALID,                 0x0139,
+                "X and Y components of vector are invalid. X^2 + Y^2 != 0x4000^2" )
+  /* E6057 */
+  FT_ERRORDEF_( FONTVAL_E_VECTOR_XY_ZERO,                    0x013A,
+                "X and Y components of vector are 0" )
+  /* E6058 */
+  FT_ERRORDEF_( FONTVAL_E_ZONE_NOT_0_NOR_1,                  0x013B,
+                "Zone not 0 nor 1" )
+  /* E6059 */
+  FT_ERRORDEF_( FONTVAL_E_rasterization,                     0x013C,
+                "Could not perform rasterization" )
+  /* E6070 */
+  FT_ERRORDEF_( FONTVAL_E_FT_EXECUTION_TOO_LONG,             0x013D,
+                "Execution time too long and exceeds dynamic limit" )
+  /* E6071 */
+  FT_ERRORDEF_( FONTVAL_E_FT_EXECUTION_TOO_LONG_BACKWARD_JUMP, 0x013E,
+                "Execution time too long and exceeds dynamic limit in backward jump" )
+  /* E6072 */
+  FT_ERRORDEF_( FONTVAL_E_FT_DEF_IN_GLYF,                    0x013F,
+                "FDEF or IDEF should be in fpgm and prep only, not in glyf" )
+  /* P6000 */
+  FT_ERRORDEF_( FONTVAL_P_rasterization,                     0x0140,
+                "No problems were found during rasterization testing" )
+  /* W6000 */
+  FT_ERRORDEF_( FONTVAL_W_APPLE_ONLY_INSTR,                  0x0141,
+                "GETVARIATION, GETDATA (Apple-specific) or IDEFs at opcode 0x91,0x92" )
+  /* W6001 */
+  FT_ERRORDEF_( FONTVAL_W_CALL_ZERO_LEN_FUNC,                0x0142,
+                "CALL to zero length function" )
+  /* W6002 */
+  FT_ERRORDEF_( FONTVAL_W_CALL_ZERO_LEN_UD_INSTR,            0x0143,
+                "Call to zero length user defined instruction" )
+  /* W6003 */
+  FT_ERRORDEF_( FONTVAL_W_DEBUG_FOUND,                       0x0144,
+                "DEBUG found which should not be found in production code" )
+  /* W6004 */
+  FT_ERRORDEF_( FONTVAL_W_DELTAC_IN_GLYPH_PGM,               0x0145,
+                "Repeated executions in glyph programs can have unexpected results" )
+  /* W6005 */
+  FT_ERRORDEF_( FONTVAL_W_HI_PT_LESS_THAN_LOW_PT,            0x0146,
+                "High point is less than low point" )
+  /* W6006 */
+  FT_ERRORDEF_( FONTVAL_W_JMP_OFFSET_ZERO,                   0x0147,
+                "Jump offset zero" )
+  /* W6007 */
+  FT_ERRORDEF_( FONTVAL_W_LOOP_NOT_1_AT_END_OF_PGM,          0x0148,
+                "Loop variable not 1 at end of program. This means it was set but not used" )
+  /* W6008 */
+  FT_ERRORDEF_( FONTVAL_W_LOOPCALL_COUNT_LESS_THAN_ONE,      0x0149,
+                "Value for count is less than 1. Function will not be called" )
+  /* W6009 */
+  FT_ERRORDEF_( FONTVAL_W_MPS_ALWAYS_12_ON_WINDOWS,          0x014A,
+                "Window 95 and Windows 3.1 always return 12" )
+  /* W6010 */
+  FT_ERRORDEF_( FONTVAL_W_PF_VECTORS_AT_OR_NEAR_PERP,        0x014B,
+                "Projection and freedom vectors at or near perpendicular" )
+  /* W6011 */
+  FT_ERRORDEF_( FONTVAL_W_PT_NOT_TOUCHED,                    0x014C,
+                "Point not touched" )
+  /* W6012 */
+  FT_ERRORDEF_( FONTVAL_W_SANGW_OBSELETE,                    0x014D,
+                "Function no longer needed because of dropped support of AA" )
+  /* W6019 */
+  FT_ERRORDEF_( FONTVAL_W_Need_Newer_FreeType,               0x014E,
+                "The Freetype version is too old" )
+  /* W6020 */
+  FT_ERRORDEF_( FONTVAL_W_FT_VALUE_OUT_OF_RANGE_SLOOP,       0x014F,
+                "Setting the loop variable to negative value" )
+  /* W6029 */
+  FT_ERRORDEF_( FONTVAL_W_FT_VALUE_OUT_OF_RANGE_SLOOP_ZERO,  0x0150,
+                "Setting the loop variable to zero is an error" )
+  /* W6021 */
+  FT_ERRORDEF_( FONTVAL_W_FT_ZERO_LEN_FUNC,                  0x0151,
+                "Defining zero-length function" )
+  /* W6022 */
+  FT_ERRORDEF_( FONTVAL_W_FT_ZERO_LEN_UD_INSTR,              0x0152,
+                "Defining zero-length user-defined instruction" )
+  /* W6023 */
+  FT_ERRORDEF_( FONTVAL_W_FT_InvalidOutline,                 0x0153,
+                "Invalid Outline" )
+  /* W6024 */
+  FT_ERRORDEF_( FONTVAL_W_FT_InvalidArgument,                0x0154,
+                "Invalid Argument" )
+  /* W6025 */
+  FT_ERRORDEF_( FONTVAL_W_FT_InvalidPixelSize,               0x0155,
+                "Invalid PixelSize" )
+  /* W6026 */
+  FT_ERRORDEF_( FONTVAL_W_FT_InvalidSizeHandle,              0x0156,
+                "Invalid Size Handle" )
+  /* W6027 */
+  FT_ERRORDEF_( FONTVAL_W_FT_MAXP_maxComponentDepth_TOO_LOW, 0x0157,
+                "maxComponentDepth in maxp is too low" )
+  /* W6028 */
+  FT_ERRORDEF_( FONTVAL_W_FT_MAX_NUM_TWILIGHT_POINTS_CLAMP,  0x0158,
+                "number of twilight points unreasonably large" )
+  /* W6030 */
+  FT_ERRORDEF_( FONTVAL_W_FT_ALIGNRP_AFTER_IUP,              0x0159,
+                "ALIGNRP after IUP in Subpixel-hinting mode" )
+  /* I6059 */
+  FT_ERRORDEF_( FONTVAL_I_rasterization,                     0x015A,
+                "Could not perform rasterization" )
+  /* I6070 */
+  FT_ERRORDEF_( FONTVAL_I_FT_Error_Supplymentary_Info,       0x015B,
+                "Supplementary Information" )
+
+  /* */
+
 
 /* END */
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to