Fix thinko in handling composite glyphs.
[ttfautohint.git] / src / taerror.c
blob7cfc4c9bc911c45e44ef151fd9dc92753f94fff9
1 /* taerror.c */
3 /*
4 * Copyright (C) 2011 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 #include "ta.h"
19 /* error message strings; */
20 /* we concatenate FreeType and ttfautohint messages into one structure */
22 typedef const struct TA_error_ {
23 int err_code;
24 const char* err_msg;
25 } TA_error;
27 TA_error TA_Errors[] =
29 #undef __FTERRORS_H__
30 #define FT_ERRORDEF(e, v, s) { e, s },
31 #define FT_ERROR_START_LIST {
32 #define FT_ERROR_END_LIST /* empty */
33 #include FT_ERRORS_H
35 #undef __TTFAUTOHINT_ERRORS_H__
36 #define TA_ERRORDEF(e, v, s) { e, s },
37 #define TA_ERROR_START_LIST /* empty */
38 #define TA_ERROR_END_LIST { 0, NULL } };
39 #include <ttfautohint-errors.h>
42 const char*
43 TA_get_error_message(FT_Error error)
45 TA_error *e = TA_Errors;
48 while (e->err_code || e->err_msg)
50 if (e->err_code == error)
51 return e->err_msg;
52 e++;
55 return NULL;
58 /* end of taerror.c */