Version 0.6.1.
[ttfautohint.git] / src / ttfautohint-errors.h
blob0a3a3c8a4bb36e220ba7e6c121fe42c70370fb6b
1 /* ttfautohint-errors.h */
3 /*
4 * Copyright (C) 2011-2012 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
16 #ifndef __TTFAUTOHINT_ERRORS_H__
17 #define __TTFAUTOHINT_ERRORS_H__
19 /* We duplicate FreeType's error handling macros for simplicity; */
20 /* however, we don't use module-specific error codes. */
22 #undef TA_ERR_XCAT
23 #undef TA_ERR_CAT
24 #define TA_ERR_XCAT(x, y) x ## y
25 #define TA_ERR_CAT(x, y) TA_ERR_XCAT(x, y)
27 #undef TA_ERR_PREFIX
28 #define TA_ERR_PREFIX TA_Err_
30 #ifndef TA_ERRORDEF
31 # define TA_ERRORDEF(e, v, s) e = v,
32 # define TA_ERROR_START_LIST enum {
33 # define TA_ERROR_END_LIST TA_ERR_CAT(TA_ERR_PREFIX, Max) };
34 #endif
36 #define TA_ERRORDEF_(e, v, s) \
37 TA_ERRORDEF(TA_ERR_CAT(TA_ERR_PREFIX, e), v, s)
38 #define TA_NOERRORDEF_ TA_ERRORDEF_
41 /* The error codes. */
43 #ifdef TA_ERROR_START_LIST
44 TA_ERROR_START_LIST
45 #endif
47 TA_NOERRORDEF_(Ok, 0x00, \
48 "no error")
50 TA_ERRORDEF_(Invalid_FreeType_Version, 0x0E, \
51 "invalid FreeType version (need 2.4.5 or higher)")
52 TA_ERRORDEF_(Missing_Legal_Permission, 0x0F, \
53 "legal permission bit in `OS/2' font table is set")
54 TA_ERRORDEF_(Invalid_Stream_Write, 0x5F, \
55 "invalid stream write")
56 TA_ERRORDEF_(Hinter_Overflow, 0xF0, \
57 "hinter overflow")
58 TA_ERRORDEF_(Missing_Glyph, 0xF1, \
59 "missing key character glyph")
60 TA_ERRORDEF_(Missing_Unicode_CMap, 0xF2, \
61 "missing Unicode character map")
63 #ifdef TA_ERROR_END_LIST
64 TA_ERROR_END_LIST
65 #endif
68 #undef TA_ERROR_START_LIST
69 #undef TA_ERROR_END_LIST
70 #undef TA_ERRORDEF
71 #undef TA_ERRORDEF_
72 #undef TA_NOERRORDEF_
74 #endif /* __TTFAUTOHINT_ERRORS_H__ */
76 /* end of ttfautohint-errors.h */